From 88f2d2a754ad2bc1548e635605aef7188780e891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 9 Apr 2016 11:52:23 +0200 Subject: [PATCH] Added the basic structure of ComicInfo view. --- YACReaderLibrary/qml.qrc | 12 + YACReaderLibrary/qml/ComicInfo.qml | 290 ++++++++++++++++++++- YACReaderLibrary/qml/InfoFavorites.qml | 15 ++ YACReaderLibrary/qml/InfoRating.qml | 21 ++ YACReaderLibrary/qml/InfoTick.qml | 15 ++ YACReaderLibrary/qml/info-favorites.png | Bin 0 -> 371 bytes YACReaderLibrary/qml/info-favorites@2x.png | Bin 0 -> 615 bytes YACReaderLibrary/qml/info-rating.png | Bin 0 -> 322 bytes YACReaderLibrary/qml/info-rating@2x.png | Bin 0 -> 551 bytes YACReaderLibrary/qml/info-tag.png | Bin 0 -> 289 bytes YACReaderLibrary/qml/info-tag@2x.png | Bin 0 -> 459 bytes YACReaderLibrary/qml/info-tick.png | Bin 0 -> 244 bytes YACReaderLibrary/qml/info-tick@2x.png | Bin 0 -> 367 bytes 13 files changed, 351 insertions(+), 2 deletions(-) create mode 100644 YACReaderLibrary/qml/InfoFavorites.qml create mode 100644 YACReaderLibrary/qml/InfoRating.qml create mode 100644 YACReaderLibrary/qml/InfoTick.qml create mode 100644 YACReaderLibrary/qml/info-favorites.png create mode 100644 YACReaderLibrary/qml/info-favorites@2x.png create mode 100644 YACReaderLibrary/qml/info-rating.png create mode 100644 YACReaderLibrary/qml/info-rating@2x.png create mode 100644 YACReaderLibrary/qml/info-tag.png create mode 100644 YACReaderLibrary/qml/info-tag@2x.png create mode 100644 YACReaderLibrary/qml/info-tick.png create mode 100644 YACReaderLibrary/qml/info-tick@2x.png diff --git a/YACReaderLibrary/qml.qrc b/YACReaderLibrary/qml.qrc index 176a4af4..69bcc0fd 100644 --- a/YACReaderLibrary/qml.qrc +++ b/YACReaderLibrary/qml.qrc @@ -12,5 +12,17 @@ qml/info-shadow.png qml/info-top-shadow.png qml/ComicInfo.qml + qml/info-favorites.png + qml/info-favorites@2x.png + qml/info-rating.png + qml/info-rating@2x.png + qml/info-tag.png + qml/info-tag@2x.png + qml/info-tick.png + qml/info-tick@2x.png + qml/InfoTick.qml + qml/InfoFavorites.qml + qml/InfoRating.qml + qml/YACReaderScrollViewStyle.qml diff --git a/YACReaderLibrary/qml/ComicInfo.qml b/YACReaderLibrary/qml/ComicInfo.qml index 09c2165f..30c9d239 100644 --- a/YACReaderLibrary/qml/ComicInfo.qml +++ b/YACReaderLibrary/qml/ComicInfo.qml @@ -1,5 +1,291 @@ -import QtQuick 2.0 +import QtQuick 2.6 -Item { +import QtQuick.Controls 1.4 +import QtQuick.Layouts 1.2 +import QtGraphicalEffects 1.0 + +Rectangle { + + color : "transparent" + id: mainContainer + + height: info.height + 2 * topMargin + + property string infoColor: "#b0b0b0" + property font infoFont: Qt.font({ + + family: "Arial", + pointSize: 10.5 + }); + + property int topMargin : 27 + + property bool compact : width <= 650 + + RowLayout + { + id:main_layout + anchors.fill: parent + + //READ------------------------------------------------------------ + ColumnLayout + { + Layout.topMargin: topMargin + Layout.maximumWidth: 61 + Layout.fillHeight: true + id: readStatus + + Layout.alignment: Qt.AlignTop | + Qt.AlignHCenter + + Rectangle { + color: "transparent" + width: 61 + height: 24 + + InfoTick { + x: 27 + y: 5 + } + } + + visible: !mainContainer.compact + } + + //INFO------------------------------------------------------------ + ColumnLayout + { + id: info + //width: parent.width + //Layout.fillWidth: true + + Layout.alignment: Qt.AlignTop | + Qt.AlignLeft + + Layout.maximumWidth: mainContainer.compact ? mainContainer.width : 960 + + Layout.leftMargin: mainContainer.compact ? 30 : 0 + + RowLayout + { + Layout.topMargin: topMargin + + InfoTick { + Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft + } + + Item { + Layout.fillWidth: true + } + + InfoFavorites { + Layout.topMargin: 1 + Layout.rightMargin: 17 + Layout.alignment: Qt.AlignTop + } + + InfoRating { + Layout.alignment: Qt.AlignTop + Layout.rightMargin: 30 + } + + visible: mainContainer.compact + } + + RowLayout + { + Text { + Layout.topMargin: mainContainer.compact ? 18 : topMargin + Layout.fillWidth: true + Layout.rightMargin: mainContainer.compact ? 30 : 0 + + id: title + + color: "#ffffff" + font.family: "Arial" + font.bold: true + font.pointSize: mainContainer.compact ? 14 : 15.75; + wrapMode: Text.WordWrap + + text: "#1" + " - " + "A Single Dream Can Spark A Revolution" + } + + RowLayout + { + visible: !mainContainer.compact + + Layout.alignment: Qt.AlignTop + Layout.topMargin: topMargin + + InfoFavorites { + Layout.topMargin: 1 + Layout.rightMargin: 17 + Layout.alignment: Qt.AlignTop + } + + InfoRating { + Layout.alignment: Qt.AlignTop + Layout.rightMargin: 30 + } + } + } + + Flow { + spacing: 0 + + Layout.fillWidth: true + Text { + id: volume + color: infoColor + font: mainContainer.infoFont + text: "Clive Barker's Next Testament" + rightPadding: 20 + } + + Text { + id: numbering + color: infoColor + font: mainContainer.infoFont + text: "1/12" + rightPadding: 20 + } + + Text { + id: genre + color: infoColor + font: mainContainer.infoFont + text: "Terror" + rightPadding: 20 + } + + Text { + id: date + color: infoColor + font: mainContainer.infoFont + text: "21/03/2016" + rightPadding: 20 + } + + Text { + id: pages + color: infoColor + font: mainContainer.infoFont + text: "23 pages" + rightPadding: 20 + } + + Text { + id: showInComicVinw + color: "#ffcc00" + font: mainContainer.infoFont + text: "Show in Comic Vine" + + onLinkActivated: Qt.openUrlExternally(link) + } + } + + Text { + Layout.topMargin: 31 + Layout.rightMargin: 30 + Layout.fillWidth: true + + id: sinopsis + color: "white" + font.family: "Arial" + font.pointSize: 11.75 + wrapMode: Text.WordWrap + horizontalAlignment: Text.AlignJustify + text: "The first original comic series created and written by Clive Barker is here!Julian Edmond, captain of industry, has left behind everything to begin a walkabout -- he believes he’s on a mission from God. While in the wasteland, he comes across a figure unlike any other, who calls himself Wick...and claims to be God. Their journey will span the globe, as neither man merely wants to make a mark on the world, but a scar.Clive Barker, with internationally acclaimed artist Haemi Jang (HELLRAISER: THE ROAD BELOW), come together to create the next legendary work in the canon of one of the great writers of our era. Ask your retailer about the ultra-limited edition signed Clive Barker variant cover, painted by the master of horror himself!" + } + + Text { + Layout.topMargin: 20 + Layout.bottomMargin: 5 + + id: authors_title + color: "white" + font.family: "Arial" + font.pointSize: 13.5 + font.bold: true + + text: "Authors" + } + + Flow { + Layout.fillWidth: true + spacing: 20 + Repeater { + id: authors + model: 50 + Column{ + Text { + color: "white" + font.family: "Arial" + font.pointSize: 11.25 + + text: "Author" + } + + Text { + color: "#b0b0b0" + font.family: "Arial" + font.pointSize: 9.75 + font.italic: true + text: "writer" + } + } + } + } + + Text { + Layout.topMargin: 20 + + id: publisher_title + color: "white" + font.family: "Arial" + font.pointSize: 13.5 + font.bold: true + + text: "Publiser" + } + + Text { + Layout.topMargin: 20 + Layout.bottomMargin: 5 + + id: characters_title + color: "white" + font.family: "Arial" + font.pointSize: 13.5 + font.bold: true + + text: "Characters" + } + + Flow { + Layout.fillWidth: true + spacing: 20 + Repeater { + id: characters + model: 50 + + Text { + color: "white" + font.family: "Arial" + font.pointSize: 11.25 + + text: "character" + } + } + } + } + + Item { + Layout.fillHeight: true + Layout.fillWidth: true + Layout.minimumWidth: 0 + Layout.preferredWidth: 0 + } + } } diff --git a/YACReaderLibrary/qml/InfoFavorites.qml b/YACReaderLibrary/qml/InfoFavorites.qml new file mode 100644 index 00000000..8ce2db26 --- /dev/null +++ b/YACReaderLibrary/qml/InfoFavorites.qml @@ -0,0 +1,15 @@ +import QtQuick 2.6 + +import QtGraphicalEffects 1.0 + +Image { + id: favorites_button_compact + source: "info-favorites.png" + + ColorOverlay { + anchors.fill: favorites_button_compact + source: favorites_button_compact + color: "#e84852" + } +} + diff --git a/YACReaderLibrary/qml/InfoRating.qml b/YACReaderLibrary/qml/InfoRating.qml new file mode 100644 index 00000000..651bdbc6 --- /dev/null +++ b/YACReaderLibrary/qml/InfoRating.qml @@ -0,0 +1,21 @@ +import QtQuick 2.6 + +import QtGraphicalEffects 1.0 + +Row { + spacing: 6 + + Repeater { + id: rating_compact + model: 5 + Image { + source: "info-rating.png" + + ColorOverlay { + anchors.fill: rating_compact.itemAt(index) + source: rating_compact.itemAt(index) + color: index <= 3 ? "#ffffff" : "#1c1c1c" + } + } + } +} diff --git a/YACReaderLibrary/qml/InfoTick.qml b/YACReaderLibrary/qml/InfoTick.qml new file mode 100644 index 00000000..8e7bdff0 --- /dev/null +++ b/YACReaderLibrary/qml/InfoTick.qml @@ -0,0 +1,15 @@ +import QtQuick 2.6 + +import QtGraphicalEffects 1.0 + +Image { + id: read_compact + + source: "info-tick.png" + + ColorOverlay { + anchors.fill: read_compact + source: read_compact + color: true ? "#e84852" : "#1c1c1c" + } +} diff --git a/YACReaderLibrary/qml/info-favorites.png b/YACReaderLibrary/qml/info-favorites.png new file mode 100644 index 0000000000000000000000000000000000000000..f8b613954db8edcc6faaf3f0e006d4ccc54a3f93 GIT binary patch literal 371 zcmV-(0gV2MP)ItE5t*YbuMhyF@`2a^ zD)az|7XtBwyAL0HfT|GyQUyR955x*kbq9cWB2di+41<9h<^!n&91geu#Eww*ejql$ zp>6@t@I<)5Ktmm%8t{PyP&$EtI!B=42Uwt-d?JD^fym$mnRS2($_b!iyn)SPqE)J3 zLW)&tfdj|}Z=|BZ8<7nL#rOv*82SO0dYD1P`;Q-f2nh)M1TsA+G`JF!)Uf5e^%SI# z4M0N!(IXEA5}~<_RB!>R7kgQOR2JaNwpg<}tSrH4Fo}j^H56wCfhq(QIvenXDK10d zsRA1Sr4%4u2}~`FNW~}&Gy)CG1gRmaJjMlpK?4es^-yjg(9jDE!wvuh7y!xGTsD&M Rg%tn*002ovPDHLkV1n)6f~^1m literal 0 HcmV?d00001 diff --git a/YACReaderLibrary/qml/info-favorites@2x.png b/YACReaderLibrary/qml/info-favorites@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..19aedd321166b90e7e3a4413a1f006ca2b221ba5 GIT binary patch literal 615 zcmV-t0+{`YP)M5#v7Q@PEO!ZS|KNZ)(%T6!U@>Y#xb0Lcmv-uAD9UnlKlfLGkG&_GJ(u{zihs@ zyKfn*tg_R#TG0bHSIt|x1mtaUPA=~w{QW^b`Ci0vnPe2JiCFjesY5Qv6Y?2i2_s;D z4iL1+#^gOpmgL0Zi1k<^R)kohG%zKQfk&EOOTu=uiSXi6d>tJNDb~0U*bp`i-C9co z5||sn=0evM8XH*D1kb$e$O2Z{08AS@%RKO6nP62&lq5(M6|)=w$rNr$0νX!e=l z8aRq~y_Q*860U-;N4DcIUZB!&+hGFkKw3=2R?j5y)wpt&I0ZXt;F-sqGZnD#7+5Hm zW}1ta9u{9hbMQr;h9@45?s!+x^*sb0rf(YQo8@nkTyicYapwu_8_D6lXj`8W)7%_Q=RxOOf^C^D&0X^NfUq%gn(ZZ^ zp@#z%;VM^N=Uw_-!m{(V>bQ-8_Y7ScRttDf&|0wCz^PN5se{==09LC$v^VfbAS*et zfQ?LGjYc>#+Varl*{^W;1F0Vh=JCqXYV2YeAtz*ZxdC;nObokLHOWcbJS&Z7HoyrndkC0RK%; Un=00g$^ZZW07*qoM6N<$g8aaNxBvhE literal 0 HcmV?d00001 diff --git a/YACReaderLibrary/qml/info-rating@2x.png b/YACReaderLibrary/qml/info-rating@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..01048c8090143e8f08d6e83e2528690813456d91 GIT binary patch literal 551 zcmV+?0@(eDP)(RCwC#m_bg%Fc1Lk&<9w2AgTC3 zcmeGXxN>WM&>x__fHSu~gB#%nC-MPAcmd%CC)kBWirOSyN4t(I)smICYB%F)vK!l& zV>9L~%`)s7u_sE**K}M;2euk^;qXes>C0PHNybkU>@HeN$7vYsIjT@_}~m54lrd2rvU6Iwzy%+Tu|q>nFesm z1jW4i+i6iyNM?$OkYQX6EVl~)jSDI`H$5>jjaBn^2k08WHq00c^S5Wb0|+s!81UAv zx;H2joV8oey@#{LM#!2Lg`1%%0e=g9O0jC6+v0@trBmlF;qV0g3NCc_{!xEQ|6H_V+Po~-c6&?0;aSW-rm6RayreUIltC5irr^71w4%QDEzdt-VDeNew z#5>!+WpBdi87opGWDF)I-e6VWYk9=|VvFVdQ&MBb@0LqDHjQ{`u literal 0 HcmV?d00001 diff --git a/YACReaderLibrary/qml/info-tag@2x.png b/YACReaderLibrary/qml/info-tag@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..04a995f87e4c1f7a276c13423346f2954f780bc5 GIT binary patch literal 459 zcmV;+0W|)JP)DTyfs+Pf>g51U+w0h^b$cP*rS-zSpWE)m}TKx*4_ zcbH{a1(zX?$Sxibr>^VX>>~)c8ZK7?ZfFI>oqdWm?#$F(!3t!?@g_+~92poIN6KPP z+y_EIH2Qa`GySmk#}u>GA#f#>jn?QR*I+9Wo=;IzjF?ts;xwSuqsq4ik!!9&-tz-) zkq~Gg5mzGbxd9nQuF?sSSdye7WijKldY73oi)Vqc)|^wBiH%!agFr4Tt_VW1Pa(&slOnUAS;8KoMUSVz#dU0{|(F)`SiTQ`i6i002ovPDHLkV1jY5 BxZMB% literal 0 HcmV?d00001 diff --git a/YACReaderLibrary/qml/info-tick.png b/YACReaderLibrary/qml/info-tick.png new file mode 100644 index 0000000000000000000000000000000000000000..aa6b80b9689b635735069ff11eb54fa4964ef5c1 GIT binary patch literal 244 zcmeAS@N?(olHy`uVBq!ia0vp^0w6XA8<1SE`<)7qk}PqJC<)F_D=AMbN@Z|N$xljE z@XSq2PYp^dzh0`BHf!7Z& p^&~RPQfzP7!8bomfPuq+A?bLuYw=d~zd#oh;P57}i#G{m z0eSQ;px`j%kW0wSl#rg`I%H{&#$00FMzEzO4g||82`UK9F#l0uN0oMX4P9#fk z!Rx0OHeBI`d&}GsWd#?!@fQ#!J~%Eo;H}SyC?UAut%nE~4&4bhcxON0DB%R}ZAeB+ zIK!