Skip to content

Commit

Permalink
Only use samples in Qt6.8+
Browse files Browse the repository at this point in the history
  • Loading branch information
luisangelsm committed Dec 21, 2024
1 parent 53ef688 commit 5a7bd78
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
1 change: 1 addition & 0 deletions YACReaderLibrary/comics_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ ComicsView::ComicsView(QWidget *parent)
auto comicInfo = &(comicDB->info);
QQmlContext *ctxt = view->rootContext();

ctxt->setContextProperty("qt_version", QT_VERSION_MAJOR + QT_VERSION_MINOR / 10.0);
ctxt->setContextProperty("comic", comicDB);
ctxt->setContextProperty("comicInfo", comicInfo);

Expand Down
7 changes: 6 additions & 1 deletion YACReaderLibrary/qml/FlowView6.qml
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,15 @@ Rectangle {
horizontalOffset: 0
verticalOffset: 0
radius: 6
samples: 17
color: "#BB000000"
source: coverElement
visible: showDropShadow;

Component.onCompleted: {
if (qt_version >= 6.8) {
samples = 17;
}
}
}

Image {
Expand Down
21 changes: 18 additions & 3 deletions YACReaderLibrary/qml/GridComicsView6.qml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,15 @@ SplitView {
horizontalOffset: 0
verticalOffset: 0
radius: 10.0
samples: 17
color: "#FF000000"
source: realCell
visible: showDropShadow;

Component.onCompleted: {
if (qt_version >= 6.8) {
samples = 17;
}
}
}

Rectangle {
Expand Down Expand Up @@ -469,10 +474,15 @@ SplitView {
verticalOffset: 0
radius: 8.0
transparentBorder: true
samples: 17
color: "#FF000000"
source: currentCoverElement
visible: showDropShadow;

Component.onCompleted: {
if (qt_version >= 6.8) {
samples = 17;
}
}
}

ColumnLayout
Expand Down Expand Up @@ -683,10 +693,15 @@ SplitView {
horizontalOffset: 0
verticalOffset: 0
radius: 8.0
samples: 17
color: "#AA000000"
source: readButton
visible: showDropShadow && !readButton.pressed

Component.onCompleted: {
if (qt_version >= 6.8) {
samples = 17;
}
}
}
}
}
Expand Down

0 comments on commit 5a7bd78

Please sign in to comment.