From ed178689a412f92f63c0429680bece2d3dfecbfc Mon Sep 17 00:00:00 2001 From: mgrojo Date: Fri, 22 Feb 2019 22:15:19 +0100 Subject: [PATCH 1/5] New setting allowing to set a dark style using a style-sheet A new setting allows to follow the system style or set a new dark style based on a the style-sheet provided by https://github.com/ColinDuquesnoy/QDarkStyleSheet The style-sheet is licensed under the MIT license. Images contained in that project are licensed under CC-BY license. Pending issues: - Use of stylesheets is incompatible to QPalette. Some colours for previewing settings in the Preferences dialog are eclipsed by the style- sheet See https://github.com/ColinDuquesnoy/QDarkStyleSheet/issues/48 - Changing the style should select matching background and foreground colours for the Browse Data and SQL tabs in Preferences. See issues #1751 #1493 and #1738 --- CMakeLists.txt | 1 + src/MainWindow.cpp | 18 + src/PreferencesDialog.cpp | 2 + src/PreferencesDialog.ui | 79 +- src/Settings.cpp | 4 + src/Settings.h | 5 + src/qdarkstyle/rc/Hmovetoolbar.png | Bin 0 -> 220 bytes src/qdarkstyle/rc/Hsepartoolbar.png | Bin 0 -> 172 bytes src/qdarkstyle/rc/Vmovetoolbar.png | Bin 0 -> 2847 bytes src/qdarkstyle/rc/Vsepartoolbar.png | Bin 0 -> 2839 bytes src/qdarkstyle/rc/branch_closed-on.png | Bin 0 -> 147 bytes src/qdarkstyle/rc/branch_closed.png | Bin 0 -> 160 bytes src/qdarkstyle/rc/branch_open-on.png | Bin 0 -> 150 bytes src/qdarkstyle/rc/branch_open.png | Bin 0 -> 166 bytes src/qdarkstyle/rc/checkbox_checked.png | Bin 0 -> 492 bytes .../rc/checkbox_checked_disabled.png | Bin 0 -> 491 bytes src/qdarkstyle/rc/checkbox_checked_focus.png | Bin 0 -> 252 bytes src/qdarkstyle/rc/checkbox_indeterminate.png | Bin 0 -> 493 bytes .../rc/checkbox_indeterminate_disabled.png | Bin 0 -> 492 bytes .../rc/checkbox_indeterminate_focus.png | Bin 0 -> 249 bytes src/qdarkstyle/rc/checkbox_unchecked.png | Bin 0 -> 464 bytes .../rc/checkbox_unchecked_disabled.png | Bin 0 -> 464 bytes .../rc/checkbox_unchecked_focus.png | Bin 0 -> 240 bytes src/qdarkstyle/rc/close-hover.png | Bin 0 -> 598 bytes src/qdarkstyle/rc/close-pressed.png | Bin 0 -> 598 bytes src/qdarkstyle/rc/close.png | Bin 0 -> 586 bytes src/qdarkstyle/rc/down_arrow.png | Bin 0 -> 165 bytes src/qdarkstyle/rc/down_arrow_disabled.png | Bin 0 -> 166 bytes src/qdarkstyle/rc/left_arrow.png | Bin 0 -> 166 bytes src/qdarkstyle/rc/left_arrow_disabled.png | Bin 0 -> 166 bytes src/qdarkstyle/rc/radio_checked.png | Bin 0 -> 940 bytes src/qdarkstyle/rc/radio_checked_disabled.png | Bin 0 -> 972 bytes src/qdarkstyle/rc/radio_checked_focus.png | Bin 0 -> 846 bytes src/qdarkstyle/rc/radio_unchecked.png | Bin 0 -> 728 bytes .../rc/radio_unchecked_disabled.png | Bin 0 -> 760 bytes src/qdarkstyle/rc/radio_unchecked_focus.png | Bin 0 -> 646 bytes src/qdarkstyle/rc/right_arrow.png | Bin 0 -> 160 bytes src/qdarkstyle/rc/right_arrow_disabled.png | Bin 0 -> 160 bytes src/qdarkstyle/rc/sizegrip.png | Bin 0 -> 129 bytes src/qdarkstyle/rc/stylesheet-branch-end.png | Bin 0 -> 224 bytes src/qdarkstyle/rc/stylesheet-branch-more.png | Bin 0 -> 182 bytes src/qdarkstyle/rc/stylesheet-vline.png | Bin 0 -> 239 bytes src/qdarkstyle/rc/transparent.png | Bin 0 -> 195 bytes src/qdarkstyle/rc/undock.png | Bin 0 -> 578 bytes src/qdarkstyle/rc/up_arrow.png | Bin 0 -> 158 bytes src/qdarkstyle/rc/up_arrow_disabled.png | Bin 0 -> 159 bytes src/qdarkstyle/style.qrc | 46 + src/qdarkstyle/style.qrc.depends | 46 + src/qdarkstyle/style.qss | 1898 +++++++++++++++++ src/src.pro | 3 +- 50 files changed, 2084 insertions(+), 18 deletions(-) create mode 100644 src/qdarkstyle/rc/Hmovetoolbar.png create mode 100644 src/qdarkstyle/rc/Hsepartoolbar.png create mode 100644 src/qdarkstyle/rc/Vmovetoolbar.png create mode 100644 src/qdarkstyle/rc/Vsepartoolbar.png create mode 100644 src/qdarkstyle/rc/branch_closed-on.png create mode 100644 src/qdarkstyle/rc/branch_closed.png create mode 100644 src/qdarkstyle/rc/branch_open-on.png create mode 100644 src/qdarkstyle/rc/branch_open.png create mode 100644 src/qdarkstyle/rc/checkbox_checked.png create mode 100644 src/qdarkstyle/rc/checkbox_checked_disabled.png create mode 100644 src/qdarkstyle/rc/checkbox_checked_focus.png create mode 100644 src/qdarkstyle/rc/checkbox_indeterminate.png create mode 100644 src/qdarkstyle/rc/checkbox_indeterminate_disabled.png create mode 100644 src/qdarkstyle/rc/checkbox_indeterminate_focus.png create mode 100644 src/qdarkstyle/rc/checkbox_unchecked.png create mode 100644 src/qdarkstyle/rc/checkbox_unchecked_disabled.png create mode 100644 src/qdarkstyle/rc/checkbox_unchecked_focus.png create mode 100644 src/qdarkstyle/rc/close-hover.png create mode 100644 src/qdarkstyle/rc/close-pressed.png create mode 100644 src/qdarkstyle/rc/close.png create mode 100644 src/qdarkstyle/rc/down_arrow.png create mode 100644 src/qdarkstyle/rc/down_arrow_disabled.png create mode 100644 src/qdarkstyle/rc/left_arrow.png create mode 100644 src/qdarkstyle/rc/left_arrow_disabled.png create mode 100644 src/qdarkstyle/rc/radio_checked.png create mode 100644 src/qdarkstyle/rc/radio_checked_disabled.png create mode 100644 src/qdarkstyle/rc/radio_checked_focus.png create mode 100644 src/qdarkstyle/rc/radio_unchecked.png create mode 100644 src/qdarkstyle/rc/radio_unchecked_disabled.png create mode 100644 src/qdarkstyle/rc/radio_unchecked_focus.png create mode 100644 src/qdarkstyle/rc/right_arrow.png create mode 100644 src/qdarkstyle/rc/right_arrow_disabled.png create mode 100644 src/qdarkstyle/rc/sizegrip.png create mode 100644 src/qdarkstyle/rc/stylesheet-branch-end.png create mode 100644 src/qdarkstyle/rc/stylesheet-branch-more.png create mode 100644 src/qdarkstyle/rc/stylesheet-vline.png create mode 100644 src/qdarkstyle/rc/transparent.png create mode 100644 src/qdarkstyle/rc/undock.png create mode 100644 src/qdarkstyle/rc/up_arrow.png create mode 100644 src/qdarkstyle/rc/up_arrow_disabled.png create mode 100644 src/qdarkstyle/style.qrc create mode 100644 src/qdarkstyle/style.qrc.depends create mode 100644 src/qdarkstyle/style.qss diff --git a/CMakeLists.txt b/CMakeLists.txt index f8eaf95c..1e3d3e9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -226,6 +226,7 @@ set(SQLB_RESOURCES src/translations/flags/flags.qrc src/translations/translations.qrc src/certs/CaCerts.qrc + src/qdarkstyle/style.qrc ) set(SQLB_MISC diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index bd049f09..c77e47e3 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -2364,6 +2364,24 @@ void MainWindow::reloadSettings() // Set data browser font ui->dataTable->reloadSettings(); + switch (static_cast(Settings::getValue("General", "appStyle").toInt())) { + case Settings::FollowDesktopStyle : + qApp->setStyleSheet(""); + + break; + case Settings::DarkStyle : + QFile f(":qdarkstyle/style.qss"); + if (!f.exists()) { + QMessageBox::warning(this, qApp->applicationName(), + tr("Could not open find resource file: %1").arg(f.fileName())); + } else { + f.open(QFile::ReadOnly | QFile::Text); + QTextStream ts(&f); + qApp->setStyleSheet(ts.readAll()); + } + break; + } + setToolButtonStyle(static_cast(Settings::getValue("General", "toolbarStyle").toInt())); ui->dbToolbar->setToolButtonStyle(static_cast(Settings::getValue("General", "toolbarStyleStructure").toInt())); ui->browseToolbar->setToolButtonStyle(static_cast(Settings::getValue("General", "toolbarStyleBrowse").toInt())); diff --git a/src/PreferencesDialog.cpp b/src/PreferencesDialog.cpp index 28cd57a6..c7e1cdad 100644 --- a/src/PreferencesDialog.cpp +++ b/src/PreferencesDialog.cpp @@ -187,6 +187,7 @@ void PreferencesDialog::loadSettings() ui->checkRegexDisabled->setChecked(Settings::getValue("extensions", "disableregex").toBool()); ui->checkAllowLoadExtension->setChecked(Settings::getValue("extensions", "enable_load_extension").toBool()); fillLanguageBox(); + ui->appStyleCombo->setCurrentIndex(Settings::getValue("General", "appStyle").toInt()); ui->toolbarStyleComboMain->setCurrentIndex(Settings::getValue("General", "toolbarStyle").toInt()); ui->toolbarStyleComboStructure->setCurrentIndex(Settings::getValue("General", "toolbarStyleStructure").toInt()); ui->toolbarStyleComboBrowse->setCurrentIndex(Settings::getValue("General", "toolbarStyleBrowse").toInt()); @@ -313,6 +314,7 @@ void PreferencesDialog::saveSettings() tr("The language will change after you restart the application.")); Settings::setValue("General", "language", newLanguage); + Settings::setValue("General", "appStyle", ui->appStyleCombo->currentIndex()); Settings::setValue("General", "toolbarStyle", ui->toolbarStyleComboMain->currentIndex()); Settings::setValue("General", "toolbarStyleStructure", ui->toolbarStyleComboStructure->currentIndex()); diff --git a/src/PreferencesDialog.ui b/src/PreferencesDialog.ui index 6c421756..3615a50b 100644 --- a/src/PreferencesDialog.ui +++ b/src/PreferencesDialog.ui @@ -122,7 +122,7 @@ - + Toolbar style @@ -132,7 +132,7 @@ - + @@ -182,7 +182,7 @@ - + @@ -232,7 +232,7 @@ - + @@ -282,7 +282,7 @@ - + @@ -332,7 +332,7 @@ - + Show remote options @@ -342,7 +342,7 @@ - + enabled @@ -352,7 +352,7 @@ - + Automatic &updates @@ -362,14 +362,14 @@ - + enabled - + DB file extensions @@ -379,14 +379,14 @@ - + Manage - + Main Window @@ -399,7 +399,7 @@ - + Database Structure @@ -412,7 +412,7 @@ - + Browse Data @@ -425,7 +425,7 @@ - + Execute SQL @@ -438,7 +438,7 @@ - + @@ -488,7 +488,7 @@ - + Edit Database Cell @@ -501,6 +501,51 @@ + + + + + 0 + 0 + + + + 0 + + + QComboBox::AdjustToContents + + + 35 + + + + 20 + 15 + + + + + Follow the desktop style + + + + + Dark style + + + + + + + + Application style + + + toolbarStyleComboStructure + + + diff --git a/src/Settings.cpp b/src/Settings.cpp index d9d157b5..dd7387be 100644 --- a/src/Settings.cpp +++ b/src/Settings.cpp @@ -154,6 +154,10 @@ QVariant Settings::getDefaultValue(const QString& group, const QString& name) if(group == "General" && name == "language") return QLocale::system().name(); + // General/appStyle + if(group == "General" && name == "appStyle") + return static_cast(FollowDesktopStyle); + // General/toolbarStyle if(group == "General" && name == "toolbarStyle") return static_cast(Qt::ToolButtonTextBesideIcon); diff --git a/src/Settings.h b/src/Settings.h index 0c7fad85..6218b80c 100644 --- a/src/Settings.h +++ b/src/Settings.h @@ -9,6 +9,11 @@ class Settings friend class PreferencesDialog; public: + + enum AppStyle { + FollowDesktopStyle, + DarkStyle + }; static QVariant getValue(const QString& group, const QString& name); static void setValue(const QString& group, const QString& name, const QVariant& value, bool dont_save_to_disk = false); static void restoreDefaults(); diff --git a/src/qdarkstyle/rc/Hmovetoolbar.png b/src/qdarkstyle/rc/Hmovetoolbar.png new file mode 100644 index 0000000000000000000000000000000000000000..cead99ed108a83715a939fc293dd7692008ac6b2 GIT binary patch literal 220 zcmeAS@N?(olHy`uVBq!ia0vp^0zmA*!3HFSYrjteQfx`y?k)_Q87dhn@7xXk0~Fyb z@Q5sCVBi)8VMc~ob0mO*>?NMQuI%?&Bn5OO*L%Ib02GqV42dXl&d<$F%_{+N85o?4 zQWHy3QxwWGOEMJPJ$(aG^itV@;trlJjv*0;-<~t%Vo=~=cKEuuHadP)@WGQuU7r}S zO7(3kn;EC7l=k(^o8K==q_@k14TBON%sx1ZaXWETh=#i?0*QIL`njxgN@xNAL{>as literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/Hsepartoolbar.png b/src/qdarkstyle/rc/Hsepartoolbar.png new file mode 100644 index 0000000000000000000000000000000000000000..7f183c8b3ee5ffaa6157867cb88ebb7e67f9c0fa GIT binary patch literal 172 zcmeAS@N?(olHy`uVBq!ia0vp^>_BYK!3HFCsxJuxDYhhUcNd1u43!L(ckTxN0g7-I zctjR6FmMB9xrG@SX3dcR3bL1Y`ns~;XOR@p6Zv)R$U2~qrKgKyh{fsT1O>Ju$B!EW z@!}4{#Nd`-q4nn`YMg93@~{6$nhfv4z>`4eS;NZqID=!NmZu#9Lx(rZWlOyY_CP}z NJYD@<);T3K0RUVxGDiRa literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/Vmovetoolbar.png b/src/qdarkstyle/rc/Vmovetoolbar.png new file mode 100644 index 0000000000000000000000000000000000000000..ac6a655e28a82d9a2a228f8242c36526e8a4c07f GIT binary patch literal 2847 zcmeAS@N?(olHy`uVBq!ia0vp^4nQox!3HFkJ+IURQteeC5hX#1CLR`%d#7cHnS%A2Lzs$J-54gd?|2;R~vB$Ugni`as5(-z;zMpLbmE z7ID(uN9924^5y%qec~iGYk0q()m=P0`zC(aps>X~A>r_{)a!Sz zY)R|Bb*k3wpXa*!-`+fZnf8m(zFJ4%hSAg`3=CXMnLsB+`1)8S=jZArrsOB3>Q&?x z0Nu*KU}IlVkeHmETB4AYnx2_wtMq>NekFy>6kDZmQ(pt$0_W6>OpmIf)Zi+=kmRcD zWXlvKdpj8?tx|+4B-HR8jh3>Am7x}#W5t}@Y|~!c^M2iSPV}rI&*A^=WN+~?=&Vl ygu8D0*FJNn=jr!(^S^Lg%ww3~C^^Nk!Gr(UTn_G4$)y^gMx>{!pUXO@geCyvkrMU* literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/Vsepartoolbar.png b/src/qdarkstyle/rc/Vsepartoolbar.png new file mode 100644 index 0000000000000000000000000000000000000000..7bf62f16850863c2320aaefe25370cc58b830b54 GIT binary patch literal 2839 zcmeAS@N?(olHy`uVBq!ia0vp^_CUCLR`!4bxG2n3iKl72Bf`gC5@>NnV&31g`pAwdPzkQ=l%7Vw==YG+Y z;*R{@$Y8N?!vx*44_b}PABGv17W(DBeA4HcDtV+}TlK|re->%8Et_p^RrY4m+oBaK zmV^avE!r#CpZ)pQi@BTkpMJ^jp{V2iw(i&y1_myMOrVn@e0{8v^K+E%t*Amd+F5V%0wNv=peG!PC{xWt~$(69A|)Be?(o literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/branch_closed.png b/src/qdarkstyle/rc/branch_closed.png new file mode 100644 index 0000000000000000000000000000000000000000..d652159a365396a046329cfc7695c89ee54431ca GIT binary patch literal 160 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJ(!2%?APo63Uq!^2X+?^QKos)S90ZA8lL>4nJ za0`PlBg3pY5H=O_B-6{JiOAS{|sjWh15M=978y+r}k{*WnkcFe(-;BX~D)* rS0)5haD*y~YzrxP=F!`JhM)Jr2M#8aN7~DQS{OWC{an^LB{Ts5zf35P literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/branch_open.png b/src/qdarkstyle/rc/branch_open.png new file mode 100644 index 0000000000000000000000000000000000000000..66f8e1ac619d242f3d5a31ffb11291c09ea40468 GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^oIuRR!2%?ApR4f$QjEnx?oJHr&dIz4a+s35-CY>w z1e^Sc1@brxJR*x37`TN&n2}-D90{Nxdx@v7EBhS|ac*foG2iHXppcfQi(?4K_2h&D z3_UzN#dZqZOE?US3>3JRaTpjFIL#0^D8eWr9I$mUBg3(s>=R~}U&3=E8!o-U3d z5v^~hTl*b$5NO-KaZ$^2My7CvC3jk<^u2WvDUf$c)s+rzv%V1E9{A4TMP-Z4lZ6F6 zJvyqaW~@Kfmu*$9pTBmh4fB87Nq1MQib$?;e-iXiZ<}* z4@CWD;9;1v<$&N$mS=`@#Ch2ZV#{}RJvQ4QaCNnQ-mU-(MmI+R8*yI$%dfxAYY;s7 z_m>{S8>aWE2aPM4zg_apbyj4!CUG}xvu2#YiDkvbx1hxrj-4fv9WXW}Qu2zs*=;EB~B@C9lD4Pt3jc#EK9uo4$63*ah<+ zss)BhMo2G`V&I;1@X1nvU9S{R&b}_{bpE^krGqN=vm#%w`~A&$lHbmbGYy8TuE%Y! g4!>ah-@}e^jYL&g^Ys^bz?fn1boFyt=akR{0GqMPK>z>% literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/checkbox_checked_disabled.png b/src/qdarkstyle/rc/checkbox_checked_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..cb63cc2fac47ad304451f864be5fb9b9085910ee GIT binary patch literal 491 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzmSQK*5Dp-y;YjHK@;M7UB8!3Q zuY)k7lg8`{prB-lYeY$Kep*R+Vo@qXd3m{BW?pu2a$-TMUVc&f>~}U&3=E7Jo-U3d z5v^~h`}!SnkZ7B~UO?mu^MY^z;cfGr%T7e}s1?W?8ZIpHm|nqi{YV9S;d_3jiRW9V zC@j#CiOINs*XRD1%4NQnC4ao1_;X|a8O{J^t^>=I&uJH^EA=Yy=q@QJXMe6{= z3nu?QmTiqn8yL4lU7L4ID46lSggggJ-lhEfrK>ewSvD~j#OXbEpLgByNx%V?Yugz2 z%=F`x=yC0fIn20j(F*mKC7cqgJZ$I97rnv0D^bF3N854ErU!Bp^;Wf}GDU{OUt^u0 zW>d#j^wD7Ns`t{1S6kg*n)>$7^lzH?%EjxII~|lJaHueWsWo@_*Zi9Q-(<7@f_{&8 zrO0b9HEPU+9v)SBw)%l|Fntmmjz{W9#jS ei>v=l+`}wZn5FJg^3NX_F$|urelF{r5}E*p0K`TB literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/checkbox_checked_focus.png b/src/qdarkstyle/rc/checkbox_checked_focus.png new file mode 100644 index 0000000000000000000000000000000000000000..671be273b06e2b721f494379ab61e527932ba69e GIT binary patch literal 252 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzwj^(N7l!{JxM1({$v_d#0*}aI zppNSx%;=;sy8pirl$i(^Q{;p7B~mkolg-~Zb$e)}u@ ze@5oRhYp5nY;MQ?&){3o{PczlV|l~dUDN*uim-MX2VD+|d1jngsyJ2mc)FUftqnvzx5JtA;>!fgJt|n_5jQ7B^fH6Ii)cTP@1u pu!mvshZ3I`*Gv}|E|RNaU|1Y$kt#XS(go-!22WQ%mvv4FO#o$0SI__e literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/checkbox_indeterminate.png b/src/qdarkstyle/rc/checkbox_indeterminate.png new file mode 100644 index 0000000000000000000000000000000000000000..41024f7688c0623c853ee9ceb8138949cb167738 GIT binary patch literal 493 zcmVq3^Yy%*$?9v7vi2H2P(8128Bb|(G4PNvN{@ZTf(3sn_sOi&WJR5%589C1Db zhCs&)0xKfAB%rDi8*{57O<)4_5qWijS3LmgKot?w^!;`wQO?#_V**LxkEL?C;d$Q3 z34D<_j%&$$-a|FC);<7TfKs-gBytH%5;%7a2k<;^G*6NSFcsCSFK#waI05=$7(Tm( zXKA)Hc7gXz!E<>7_ErgOC56D&1`2f;J-djcl1whQ1*)tmxvW08H=aDaB2-ihxwfOi!+%lfAUc7T48B=@f2S)wSqMWl~v zZI(b4)#rJ^CmD~QfYn(73rQ)kZ~?z)ATUOY#(t96+Wf5x{DKuI1xkTZpzt0jI=8N~ z@D(TpewDxrBCCa!&WPR`@bXPS;RdLmG@G0AVz*kYZB*;P;G2LaatSOCE0wD-47cV1 zuZZ-3B^9~I`tuKy4iEtEUw^L;PUs>VUo&4)=p@!2lYf|GrJ*qgDsqPEE>LwM@VVy$ iRL|pXH+A&QKavmPo@ys59Ed6a0000E;YP`4SSj=K`lQnqN;26wzVN;k)FHnvrk3C?wm`aM7umdKI;Vst05m34zW@LL literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/checkbox_unchecked.png b/src/qdarkstyle/rc/checkbox_unchecked.png new file mode 100644 index 0000000000000000000000000000000000000000..2159aca9a10f75729912579b33a1226e575799aa GIT binary patch literal 464 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzmSQK*5Dp-y;YjHK@;M7UB8!3Q zuY)k7lg8`{prB-lYeY$Kep*R+Vo@qXd3m{BW?pu2a$-TMUVc&f>~}U&3=E9Eo-U3d z5v^~hTl*b$5Mg-k8hGeCL!&lB&^xD7y>BB#3gn$qXZC6ymd#kPSfgCwOO2D=r^N+5 zJw7|dgetV6qbk!>#or&Sckj|)rDfLlx9!BzLz){NpZKh3z}$B1``V5SO@~m`&d1TB zFPXg)nog`1-usI20_&}gBemzbKX;_n9XqyBf99W!7jwS#7#6F4()FBFa_MYZPgcU( zS_U_U-aih`PlO_t6}*e$OX!)Ie`yQ*8keuHPS3X2n8Pqxfn#3m>Ec5MHB4$L|F3^% zND!}B?-loe_r`C{2jMH2Uo}`Q;Db^cY&se~TB4iwmri9$b1?Uu;sB%_cFATAov~jhym_YEdgAln?ixeQ z^=a2;y}eWCW~RA2fzc;$?>Dw)YxnzqlxvtK94R$eY;o}lF!UKbUHx3vIVCg!09=m0 AT>t<8 literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/checkbox_unchecked_disabled.png b/src/qdarkstyle/rc/checkbox_unchecked_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..ade721e81ba47fa792d4586516b8744f8c49c8bb GIT binary patch literal 464 zcmV;>0WbcEP)z3Xli7-6*p9aNvlr>Itd;TFIVxd-y|OyrCsEBb@QA; zCyb(7HXkO*sBg@biZoF@2MSgIU*CL)>Rq?ji!Gh`NAd|iaAZN1hu>)c0000U^V1tLjO7h)cTN8vD8kxl9CSG-=9zI~sp3@KWFU8GbZ8()Nlj2>E@cM*00Fv5L_t(|+U=WLk^&(N zMNQT>E=U)k3)21RpJh4PJd%48X!1Rk<{TbF5DteGD^~0|g!!@C>GY`iyW{mLQwXR9 zjuawUp;Cior+G8=rW1YKL<346a~6o?i6 z?{azNxS!7yQSaX@eYYe*y&Lw~I5fO96fyKs5_ zy6%Wq@1q*&nfKd*=(Y$VMgp?uA^!zDB{1N>P63ZikG1hg_|Ito*$P`m0;}iYwLp&q zHaxr-YLO5D|8EUI6+I<5HvIcKKq-fN*91m!MLQ2@g<(~e)B}-PC>A_jKn)xdK16_J zA27UtS~#Wz%?8hwpwaM*^Mp_VHSm!VAk|=R&oeeflxnaSCSoLLra2!WK{LTeNN_t8 zMa*IEe9%Kt!~(_`37Qq2CE;g++G)V5=dIuQ^&@G>nP7%|MFEzZSE$DJ=G|h^>^+ap zZ@wUrJxU{aU6H9xwr+_{8tbBDYw}%RmCY=Ic3C>3gpljWFU8GbZ8()Nlj2>E@cM*00Fv5L_t(|+U=WLk^&(N zMNJl_8_?B`8_ zy6%Wq@1q*&nfKd*=(Y$VMgp?uA^!zDB{1N>P63ZikG1hg_|Ito*$P`m0;}iYwLp&q zHaxr-YLO5D|8EUI6+I<5HvIcKKq-fN*91m!MLQ2@g<(~e)B}-PC>A_jKn)xdK16_J zA27UtS~#Wz%?8hwpwaM*^Mp_VHSm!VAk|=R&oeeflxnaSCSoLLra2!WK{LTeNN_t8 zMa*IEe9%Kt!~(_`37Qq2CE;g++G)V5=dIuQ^&@G>nP7%|MFEzZSE$DJ=G|h^>^+ap zZ@wUrJxU{aU6H9xwr+_{8tbBDYw}%RmCY=Ic3C>3gpljWFU8GbZ8()Nlj2>E@cM*00FK^L_t(|+U=W3lEWYj zMI&9@_Q}(`u2cpl>3<1~)?G61A!s1*ckDcfFZ2UV}LO?5Uq!7sp&5|Lr zfTKjnjPRZkWJYjL5i&cxRf5b8ZWSRb!H-Cg)!=(2=w1ph*!w+IAXfO}IR0~7*F_Qa z`pw#RYZBDEVegGY!&^fUrH_&@lDEd7sB!Nt!IH1UVjcpe@#iI>l*c;nh*$5U8tIw$ z+l1&g2_h;1+4GS90-h2W@Lz|3$D+sDcqIJ$Fn}zDEtSCPdH7ynL;@Qgz8UI~5CQ)& z2cR}RH8?i>>pVc&4v)?WjLjA8JfIhbwX>uih_phn;OPQd;F$0s0xau*=>@dHF(qg= zc(w$MhG(27gbHYZkCXt}4UYCaV^Kue4UWP@RDxz2^AQp>6MTdOw?k3H81~KwJrqSu zV2n!8tne%eQYe>aG`#0`e*H)qaweD|UsZtR<`t^3qj^g#n!V@I`OOz3vPZ3w_Z69r zWc!xbim@+B4kW+tRoToUXqTlkN(i|wpGAW8(Zqf-18CSiA59@;O!aKeLkRQXw z1e^Sc1@brxJR*x37`TN&n2}-D90{Nxdx@v7EBhS|ac(A-+!@lDKp{;}7sn8e>&XcR z7pulY;Wn^IBG(*7A%~?b^VC!N=hHC=sm-IdEdjT~uc)I$ztaD0e F0ssj2CNKa1 literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/down_arrow_disabled.png b/src/qdarkstyle/rc/down_arrow_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..5805d9842bb3c8bdf9ae741ebabc690a4929585a GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^oIuRR!2%?ApR4f$QjEnx?oJHr&dIz4a+s35-CY>| zxA&jf59DzcctjR6FmMZlFeAgPITAoY_7YEDSN1y`;vAyZcdU741BJ9aT^vI=t|uoP zVCdoDDYjGKUczBuWT3#kjKjddz-flSK@mm~;ef4+85xf4WSF7(8A5T-G@y GGywodVJqnX literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/left_arrow_disabled.png b/src/qdarkstyle/rc/left_arrow_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..f5b9af8a34edb5f8dd767bf6afa303b89a31d38f GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJ(!2%?APo63Uq!^2X+?^QKos)S9bR`<_$&i(E==bj5a^zeU&bwdtch>=_qAH5C#I(A02SZ= z-pqyvve{!vh3V|K2(Z;?j0;|Hq>tJ+4>OtTGCRJHZF@ZOcP8^q5Cr`I<~ScB9o=p= z&m^6bC_rXoz*@WDo;`Hvf?xzGIc?G2OIwY`1pwD|f5YrH(7gbIoJl|JS(+dUbvmTb zB5r&Bqu`aU1z`4E`<=%)mdf9?a};sgxR2RT5LuX#bWVMU#oQ*xD``&)6vecw1(rnna}5U zBv}}JUU#-zt!rHi$mjDrIL<6^D(>w}Oik4Xve{RW-j%cpG=ZjI)y&=*IB?)K*LCj$ zRDHh$oRrzj^z?Kq>70&LUiJM2-~*uKdfs9uz9g&qe#y)}0Tx})E2Z%}7S+9tjgq8G zz(UpczpGZOFDG$V%H`Y_mC6rh_9@YK{BbA$PyEhTe19x7TSPh3(2no@8jnJ}d` zxvz`)Xu-@3Q@U%O-8ttu@B6#&eeXFJcD1YLUFyZ`x^CY1#GHEIZf^VJ)fa|)EWFnC_vkwH{ z6N%(XrPA_FUeEIm3uZ8T)68avQmNeZ^mN!MezY4vBl-Klxl+0Oc_(iW1WUkMr#lwA61mWP^6gmcikThUVXxDm7!9M*?_AgI18~gF z1H*|#;zYYVZ2=^WVYb|CxN5a}7PC=xsG2|quMNcGX92#vbZHT|j#=*jKpN?%*2wG> z^-_116auGOL$e=c_Il3%1~2LHcaC7B3vd(Eku=gAhHwvQuxEgJEbHl{+%bXUhz^zO z1aMzw`&uyYd#6AxNnr@rTl>rgF}wdX0Kb}a^ohVmh_EiNtnd~J1gWB9;< zQeQOsw@G^iF9MGY79E(`tkvF|pP&B+z|Uqc0A~cJFP2I-+U4om@B3+mVcy`Fr2H#G zLmzjg?Ph4o^Sm*c%>u*JKeMaA-Ny3E)PG1ufSZlmvu)!&6#&$4$V4J>LSZIJL>K{la{0H2c zs~|?9C^x;rMaWb-8PX3|8pCWt!biMuy0?XQWQb<;X|43Tx`%u2d*Ay#=bm%m2uC>V zP+^=~UTj8M8r2nG5a!!_AedR2Z~X` z^C#k-|Ev48KfKp7anB!#d;YJu=VuP2fR+8R!0=+yodD>W_Zv61xCvYrMa;V91*W48 zlk+`pV9$aJo67F4y{x)QP|# zuvAI7%`!tkOxID(?!{Xg)et~F>Au&7WnfWmGWAJX(Q5Xad@h zW4pXoZt`faArQrMmE8|4geKr9vZClrczyyP>M$wW1;^C+m=Rbk24>RMfiB>Tz-(v& zg}`J5R?CJlfcYLbaD)NiLsho($9hS_#bPR2np!I<+q}LsH82yJKrt09X&4bjD(?9s z0J&awy%3nQz-?_<0DQpLhJ}c5s}PuT`K0>|VEpS=+R8ut=DfSL?<|gce#SPIk-hj& zt(8>gOaGp2U}Fbv$L{QRX+PHZKoq0E9FWc@-S;(`SC^H&KO$sSHiG-Rwc{`Y$)JXZ zz-et*7KJCUW)t9~eK8%t7hpJ_bZ7s|NY)%tmqqQ2WNlR=*;_}EZE9fVKruhU5e^-G Y1NpBZRoRadK>z>%07*qoM6N<$f;w}DFaQ7m literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/radio_unchecked.png b/src/qdarkstyle/rc/radio_unchecked.png new file mode 100644 index 0000000000000000000000000000000000000000..9a4def65c64a9d55441f82fe66fc7f46e5b73a75 GIT binary patch literal 728 zcmV;}0w?{6P)@!=&7gwT^7eV48y+tYIRCxlLiT(zip~u_E}K!eZQ1UCJ)XWpcn*qFv|mj2Hymm zGOGZ1&1OGlqk`+ej=|zgCiDDE0Kzalw_mH}fqMq8tl7*>&(3Zg z<=pb}a>SKCQhxe=1 zDZv#_S~^K`0Q0>2NJI5nZ6eAi5Q&W)Tj`Fao}46Y)*j1A!XehJuV&-U1oWX;y{+O9Vm8?gbB$>af^ zw*ZW{XL~Faoy!4ZGMk^9n`^`d07#`$FMw5G<+u=%tPliCX7&)sr_<@k@^=LQ*e#cH zlGcEH(Ye>fV(~_l?|Kj7Dkc) literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/radio_unchecked_disabled.png b/src/qdarkstyle/rc/radio_unchecked_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..6ece890e750b0685bbd818f22e5fbf999ccd35e1 GIT binary patch literal 760 zcmV6Hyq3pRX0tGI#@4O=(z(ra$opASN0&l!V!~ zGsFupMi4Yn7A{E9xN<|Zbl8%Z;>x%YH!O_WHWI)PKm&#gz*M7gJ{PpnM5bj5JNs=u!`ga zdVmk2x~L*MwQ&UK2QB~`Dl%3m6rLT6fN7e+lZKH~)f)mY2nNUV`F!P|tYujVfhklk ztLk(#78{?OoOB!Qf1;T{t^7JLns=NBjk1M8p$uFZv8+*G>eJ>Xz*wU-!A3(nlNkmc z35?D<&ckN1bxP&(QZkYFE+Y35$z-KmF0XlIJs*K-nw{NUU8}&yS;x70*z&)zv)PwG z&(~_T&+A|YycTzd!$Uw!g29Pa$^inZw}4*5Fa|v{UIP(HqgwGgaEIaP+*}D*M%BLn zkV52jtL1e>^_8ez^ev!pO8&g(E#tx$L?XTg094i2O?hBJARzl5{sneL_4H8%R5gO? zZYu(BRiyu@0>FU48{Yx~Mc}+;S&3GgZQD)(=Mi(Ony70 zgw)FKi^z1|aUM4cH~kt$W3lniTU)BCIV+pJ6jU9r-EjY4+jdG^H>WTlBDu5C=s2S%SwytG|&qy1B<|RZG49PACf*`UEpTkaXb%RO9HU}g)|IfP+T{SND8Rm6FUm; qM77uv3N6gc%>4ATZ<{v%H@^W&H{IQg@q%gq0000;(ZNqD1xa&r7l*n1_#$VNv$@8uKpD^(Yg!rs-u&mySz3x zZPmewoA|3(5ed=3lvIQo?lU4S?;e*cbV-``!^wBndk*Jwe%*6`Ofvc3g`y}Qe%Lrf zM~=<{C<7<~DB7nM*t{X(_-1F@|8?!;Zt4JTJ(y!=55OpZ_h7S5!fDy(A~R0{I738D zL8$7fp+~8t=)#MxT`%|Gok$E|orn3AV17^=sdPmu z9ZIFWq|WE0((KlQ>oIJr*0vn02W-QAB%)70FAq({4B!bfkMfUi~ek_$f*RST)55J#+#BE2=;@(#CR+jDgK2NURglS37FQ?Zk`&XaJb+PUn~Z%}G`mo&kx!C)voplk7DK$Im&m^!<{% gmtDJ=WHPAy0n)7IgxW`FVE_OC07*qoM6N<$f`lX-a{vGU literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/right_arrow.png b/src/qdarkstyle/rc/right_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..9b0a4e6a7a8097818d9c0626c84f19f4d690dd31 GIT binary patch literal 160 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJ(!2%?APo63Uq!^2X+?^QKos)S9wUkJ;l%oZHT?}(3D>Wp7T%b9XV|~Y(T_!;F44$rjF6*2UngIS-C?Eg; literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/sizegrip.png b/src/qdarkstyle/rc/sizegrip.png new file mode 100644 index 0000000000000000000000000000000000000000..350583aaac4aa474ac449eaea2cc7ddd060276b9 GIT binary patch literal 129 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!D3?x-;bCrM;TYyi9E0A8dZe4lyHC-T!u_VYZ zn8D%MjWi%f)6>Nz(!sM1rC-2ha+zM<2rMwpeI*@Z@PO%TWH}e*?iSqXK(y9 XcW6R37#&FAr-gY z-rUH`puoZ4SQyZj9Qd}kRkgExspwA+*PdmovgYQ`l$1@M%Pi(EdF8VmvF&CX@A%e}M=bpY`_UHx3vIVCg!0H#+y$^ZZW literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/stylesheet-branch-more.png b/src/qdarkstyle/rc/stylesheet-branch-more.png new file mode 100644 index 0000000000000000000000000000000000000000..62711409d7ed69ec98979394795822630458d9eb GIT binary patch literal 182 zcmeAS@N?(olHy`uVBq!ia0vp^5PiX%b9eR9<JS%C8jVk7;fc! UBk#RM6lem2r>mdKI;Vst0ANBkrT_o{ literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/stylesheet-vline.png b/src/qdarkstyle/rc/stylesheet-vline.png new file mode 100644 index 0000000000000000000000000000000000000000..87536cce16aabb3710663f720f8d354b1bb0b757 GIT binary patch literal 239 zcmeAS@N?(olHy`uVBq!ia0vp^fk14@;zM~Ln>~) zy|9s&!GMF=@x%h2gO1`OFspnaH4_oY}#FfpL8m Q-wTkir>mdKI;Vst0J6j{!2kdN literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/undock.png b/src/qdarkstyle/rc/undock.png new file mode 100644 index 0000000000000000000000000000000000000000..88691d779507c9b809391396407f5cb4a6497c40 GIT binary patch literal 578 zcmV-I0=@l-P)WFU8GbZ8()Nlj2>E@cM*00E{+L_t(|+U=X$4#OY} zLz`&--S*43w`rPoNlWaQLS8pfd~hg*uq-oX%osV0`LJ!+SPR{}9r(JUC& zi*OVO>rs3r1nW_FCJ5_Yd@BU&U3e=9yOQ`b5bSE=k3zUrc5+?UXD9c4F9B>-qyH)% z1tH=BQxRVU!7FWl=67leWRLz4ahXo| zoe{&T7oZ-FMxDSsBBvjZ{}acq6e%f?_~rzJ_LzyflS`(bcuN3?R&llQTw-2U8((=NC3B QV*mgE07*qoM6N<$f{lRZzyJUM literal 0 HcmV?d00001 diff --git a/src/qdarkstyle/rc/up_arrow.png b/src/qdarkstyle/rc/up_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..abcc7245212f19a5dbff1bb19647b1dd4bb05b6a GIT binary patch literal 158 zcmeAS@N?(olHy`uVBq!ia0vp^oIuRR!2%?ApR4f$QjEnx?oJHr&dIz4a+s35-CY>| zxA&jf59DzcctjR6FmMZlFeAgPITAoY_7YEDSN1y`;vAy| zxA&jf59DzcctjR6FmMZlFeAgPITAoY_7YEDSN1y`;v6FKKb3EC1BH}5T^vI=t|uoP z;C)upuu) + + rc/up_arrow_disabled.png + rc/Hmovetoolbar.png + rc/stylesheet-branch-end.png + rc/branch_closed-on.png + rc/stylesheet-vline.png + rc/branch_closed.png + rc/branch_open-on.png + rc/transparent.png + rc/right_arrow_disabled.png + rc/sizegrip.png + rc/close.png + rc/close-hover.png + rc/close-pressed.png + rc/down_arrow.png + rc/Vmovetoolbar.png + rc/left_arrow.png + rc/stylesheet-branch-more.png + rc/up_arrow.png + rc/right_arrow.png + rc/left_arrow_disabled.png + rc/Hsepartoolbar.png + rc/branch_open.png + rc/Vsepartoolbar.png + rc/down_arrow_disabled.png + rc/undock.png + rc/checkbox_checked_disabled.png + rc/checkbox_checked_focus.png + rc/checkbox_checked.png + rc/checkbox_indeterminate.png + rc/checkbox_indeterminate_focus.png + rc/checkbox_unchecked_disabled.png + rc/checkbox_unchecked_focus.png + rc/checkbox_unchecked.png + rc/radio_checked_disabled.png + rc/radio_checked_focus.png + rc/radio_checked.png + rc/radio_unchecked_disabled.png + rc/radio_unchecked_focus.png + rc/radio_unchecked.png + + + style.qss + + diff --git a/src/qdarkstyle/style.qrc.depends b/src/qdarkstyle/style.qrc.depends new file mode 100644 index 00000000..ac14bc50 --- /dev/null +++ b/src/qdarkstyle/style.qrc.depends @@ -0,0 +1,46 @@ + + + rc/up_arrow_disabled.png + rc/Hmovetoolbar.png + rc/stylesheet-branch-end.png + rc/branch_closed-on.png + rc/stylesheet-vline.png + rc/branch_closed.png + rc/branch_open-on.png + rc/transparent.png + rc/right_arrow_disabled.png + rc/sizegrip.png + rc/close.png + rc/close-hover.png + rc/close-pressed.png + rc/down_arrow.png + rc/Vmovetoolbar.png + rc/left_arrow.png + rc/stylesheet-branch-more.png + rc/up_arrow.png + rc/right_arrow.png + rc/left_arrow_disabled.png + rc/Hsepartoolbar.png + rc/branch_open.png + rc/Vsepartoolbar.png + rc/down_arrow_disabled.png + rc/undock.png + rc/checkbox_checked_disabled.png + rc/checkbox_checked_focus.png + rc/checkbox_checked.png + rc/checkbox_indeterminate.png + rc/checkbox_indeterminate_focus.png + rc/checkbox_unchecked_disabled.png + rc/checkbox_unchecked_focus.png + rc/checkbox_unchecked.png + rc/radio_checked_disabled.png + rc/radio_checked_focus.png + rc/radio_checked.png + rc/radio_unchecked_disabled.png + rc/radio_unchecked_focus.png + rc/radio_unchecked.png + + + style.qss + + diff --git a/src/qdarkstyle/style.qss b/src/qdarkstyle/style.qss new file mode 100644 index 00000000..0ca3c73d --- /dev/null +++ b/src/qdarkstyle/style.qss @@ -0,0 +1,1898 @@ +/* QDarkStyleSheet -------------------------------------------------------- + +This is the main style sheet, the palette has nine main colors. +It is based on three selecting colors, three greyish (background) colors +plus three whitish (foreground) colors. Each set of widgets of the same +type have a header like this: + + ------------------ + GroupName -------- + ------------------ + +And each widget is separated with a header like this: + + QWidgetName ------ + +This makes more easy to find and change some css field. The basic +configuration is described bellow. + + SELECTION ------------ + + sel_light #179AE0 #148CD2 (selection/hover/active) + sel_normal #3375A3 #1464A0 (selected) + sel_dark #18465D #14506E (selected disabled) + + FOREGROUND ----------- + + for_light #EFF0F1 #F0F0F0 (texts/labels) + for_dark #505F69 #787878 (disabled texts) + + BACKGROUND ----------- + + bac_light #4D545B #505F69 (unpressed) + bac_normal #31363B #32414B (border, disabled, pressed, checked, toolbars, menus) + bac_dark #232629 #19232D (background) + +If a stranger configuration is required because of a bugfix or anything +else, keep the comment on that line to nobodys changed it, including the +issue number. +--------------------------------------------------------------------------- */ + + + +/* QWidget ---------------------------------------------------------------- */ + +QWidget { + background-color: #19232D; + border: 0px solid #32414B; + padding: 0px; + color: #F0F0F0; + selection-background-color: #1464A0; + selection-color: #F0F0F0; +} + +QWidget:disabled { + background-color: #19232D; + color: #787878; + selection-background-color: #14506E; + selection-color: #787878; +} + +QWidget:item:selected { + background-color: #1464A0; +} + +QWidget:item:hover { + background-color: #148CD2; + color: #32414B; +} + +/* QMainWindow ------------------------------------------------------------ */ +/* This adjusts the splitter in the dock widget, not qsplitter */ + + +QMainWindow::separator { + background-color: #32414B; + border: 0 solid #19232D; + spacing: 0; + padding: 2px; +} + +QMainWindow::separator:hover { + background-color: #505F69; + border: 0px solid #148CD2; +} + +QMainWindow::separator:horizontal { + width: 5px; + margin-top: 2px; + margin-bottom: 2px; + image: url(:/qss_icons/rc/Vsepartoolbar.png); +} + +QMainWindow::separator:vertical { + height: 5px; + margin-left: 2px; + margin-right: 2px; + image: url(:/qss_icons/rc/Hsepartoolbar.png); +} + +/* QToolTip --------------------------------------------------------------- */ + +QToolTip { + background-color: #148CD2; + border: 1px solid #19232D; + color: #19232D; + padding: 0; /*remove padding, for fix combo box tooltip*/ + opacity: 230; /*reducing transparency to read better*/ +} + +/* QStatusBar ------------------------------------------------------------- */ + +QStatusBar { + border: 1px solid #32414B; +} + +QStatusBar QToolTip { + background-color: #148CD2; + border: 1px solid #19232D; + color: #19232D; + padding: 0; /*remove padding, for fix combo box tooltip*/ + opacity: 230; /*reducing transparency to read better*/ +} + +/* QCheckBox -------------------------------------------------------------- */ + +QCheckBox { + background-color: #19232D; + color: #F0F0F0; + spacing: 4px; + outline: none; + padding-top: 4px; + padding-bottom: 4px; +} + +QCheckBox:focus { + border: none; +} + +QCheckBox QWidget:disabled { + background-color: #19232D; + color: #787878; +} + +QCheckBox::indicator { + margin-left: 4px; + width: 16px; + height: 16px; +} + +QCheckBox::indicator:unchecked { + image: url(:/qss_icons/rc/checkbox_unchecked.png); +} + +QCheckBox::indicator:unchecked:hover, +QCheckBox::indicator:unchecked:focus, +QCheckBox::indicator:unchecked:pressed { + border: none; + image: url(:/qss_icons/rc/checkbox_unchecked_focus.png); +} + +QCheckBox::indicator:unchecked:disabled { + image: url(:/qss_icons/rc/checkbox_unchecked_disabled.png); +} + +QCheckBox::indicator:checked { + image: url(:/qss_icons/rc/checkbox_checked.png); +} + +QCheckBox::indicator:checked:hover, +QCheckBox::indicator:checked:focus, +QCheckBox::indicator:checked:pressed { + border: none; + image: url(:/qss_icons/rc/checkbox_checked_focus.png); +} + +QCheckBox::indicator:checked:disabled{ + image: url(:/qss_icons/rc/checkbox_checked_disabled.png); +} + +QCheckBox::indicator:indeterminate { + image: url(:/qss_icons/rc/checkbox_indeterminate.png); +} + +QCheckBox::indicator:indeterminate:disabled { + image: url(:/qss_icons/rc/checkbox_indeterminate_disabled.png); +} + +QCheckBox::indicator:indeterminate:focus, +QCheckBox::indicator:indeterminate:hover, +QCheckBox::indicator:indeterminate:pressed { + image: url(:/qss_icons/rc/checkbox_indeterminate_focus.png); +} + +/* QGroupBox -------------------------------------------------------------- */ + +QGroupBox { + font-weight: bold; + border: 1px solid #32414B; + border-radius: 4px; + padding: 4px; + margin-top: 16px; +} + + + +QGroupBox::title { + subcontrol-origin: margin; + subcontrol-position: top left; + left: 3px; + padding-left: 3px; + padding-right: 5px; + padding-top: 8px; + padding-bottom: 16px; +} + +QGroupBox::indicator { + margin-left: 4px; + width: 16px; + height: 16px; +} + +QGroupBox::indicator { + margin-left: 2px; +} + +QGroupBox::indicator:unchecked:hover, +QGroupBox::indicator:unchecked:focus, +QGroupBox::indicator:unchecked:pressed { + border: none; + image: url(:/qss_icons/rc/checkbox_unchecked_focus.png); +} + +QGroupBox::indicator:checked:hover, +QGroupBox::indicator:checked:focus, +QGroupBox::indicator:checked:pressed { + border: none; + image: url(:/qss_icons/rc/checkbox_checked_focus.png); +} + +QGroupBox::indicator:checked:disabled { + image: url(:/qss_icons/rc/checkbox_checked_disabled.png); +} + +QGroupBox::indicator:unchecked:disabled { + image: url(:/qss_icons/rc/checkbox_unchecked_disabled.png); +} + +/* QRadioButton ----------------------------------------------------------- */ + +QRadioButton { + background-color: #19232D; + color: #F0F0F0; + spacing: 0; + padding: 0; + border: none; + outline: none; +} + +QRadioButton:focus { + border: none; +} + +QRadioButton:disabled { + background-color: #19232D; + color: #787878; + border: none; + outline: none; +} + +QRadioButton QWidget { + background-color: #19232D; + color: #F0F0F0; + spacing: 0px; + padding: 0px; + outline: none; + border: none; +} + +QRadioButton::indicator { + border: none; + outline: none; + margin-bottom: 2px; + width: 25px; + height: 25px; +} + +QRadioButton::indicator:unchecked { + image: url(:/qss_icons/rc/radio_unchecked.png); +} + +QRadioButton::indicator:unchecked:hover, +QRadioButton::indicator:unchecked:focus, +QRadioButton::indicator:unchecked:pressed { + border: none; + outline: none; + image: url(:/qss_icons/rc/radio_unchecked_focus.png); +} + +QRadioButton::indicator:checked { + border: none; + outline: none; + image: url(:/qss_icons/rc/radio_checked.png); +} + +QRadioButton::indicator:checked:hover, +QRadioButton::indicator:checked:focus, +QRadioButton::indicator:checked:pressed { + border: none; + outline: none; + image: url(:/qss_icons/rc/radio_checked_focus.png); +} + +QRadioButton::indicator:checked:disabled { + outline: none; + image: url(:/qss_icons/rc/radio_checked_disabled.png); +} + +QRadioButton::indicator:unchecked:disabled { + image: url(:/qss_icons/rc/radio_unchecked_disabled.png); +} + +/* QMenuBar --------------------------------------------------------------- */ + +QMenuBar { + background-color: #32414B; + padding: 2px; + border: 1px solid #19232D; + color: #F0F0F0; +} + +QMenuBar:focus { + border: 1px solid #148CD2; +} + +QMenuBar::item { + background: transparent; + padding: 4px; +} + +QMenuBar::item:selected { + padding: 4px; + background: transparent; + border: 0px solid #32414B; +} + +QMenuBar::item:pressed { + padding: 4px; + border: 0px solid #32414B; + background-color: #148CD2; + color: #F0F0F0; + margin-bottom: 0px; + padding-bottom: 0px; +} + +/* QMenu ------------------------------------------------------------------ */ + +QMenu { + border: 0px solid #32414B; + color: #F0F0F0; + margin: 0px; +} + +QMenu::separator { + height: 2px; + background-color: #505F69; + color: #F0F0F0; + padding-left: 4px; + margin-left: 2px; + margin-right: 2px; +} + +QMenu::icon { + margin: 0px; + padding-left:4px; +} + +QMenu::item { + padding: 4px 24px 4px 24px; + border: 1px transparent #32414B; /* reserve space for selection border */ +} + +QMenu::item:selected { + color: #F0F0F0; +} + + + +QMenu::indicator { + width: 12px; + height: 12px; + padding-left:6px; +} + +/* non-exclusive indicator = check box style indicator (see QActionGroup::setExclusive) */ + +QMenu::indicator:non-exclusive:unchecked { + image: url(:/qss_icons/rc/checkbox_unchecked.png); +} + +QMenu::indicator:non-exclusive:unchecked:selected { + image: url(:/qss_icons/rc/checkbox_unchecked_disabled.png); +} + +QMenu::indicator:non-exclusive:checked { + image: url(:/qss_icons/rc/checkbox_checked.png); +} + +QMenu::indicator:non-exclusive:checked:selected { + image: url(:/qss_icons/rc/checkbox_checked_disabled.png); +} + +/* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */ + +QMenu::indicator:exclusive:unchecked { + image: url(:/qss_icons/rc/radio_unchecked.png); +} + +QMenu::indicator:exclusive:unchecked:selected { + image: url(:/qss_icons/rc/radio_unchecked_disabled.png); +} + +QMenu::indicator:exclusive:checked { + image: url(:/qss_icons/rc/radio_checked.png); +} + +QMenu::indicator:exclusive:checked:selected { + image: url(:/qss_icons/rc/radio_checked_disabled.png); +} + +QMenu::right-arrow { + margin: 5px; + image: url(:/qss_icons/rc/right_arrow.png) +} + +/* QAbstractItemView ------------------------------------------------------ */ + +QAbstractItemView { + alternate-background-color: #19232D; + color: #F0F0F0; + border: 1px solid #32414B; + border-radius: 4px; +} + +QAbstractItemView QLineEdit { + padding: 2px; +} + +/* QAbstractScrollArea ---------------------------------------------------- */ + +QAbstractScrollArea { + background-color: #19232D; + border: 1px solid #32414B; + border-radius: 4px; + padding: 4px; + color: #F0F0F0; +} + +QAbstractScrollArea:disabled { + color: #787878; +} + +/* QScrollArea ------------------------------------------------------------ */ + +QScrollArea QWidget QWidget:disabled { + background-color: #19232D; +} + +/* QScrollBar ------------------------------------------------------------- */ + +QScrollBar:horizontal { + height: 16px; + margin: 2px 16px 2px 16px; + border: 1px solid #32414B; + border-radius: 4px; + background-color: #19232D; +} + +QScrollBar::handle:horizontal { + background-color: #787878; + border: 1px solid #32414B; + border-radius: 4px; + min-width: 8px; + +} + +QScrollBar::handle:horizontal:hover { + background-color: #148CD2; + border: 1px solid #148CD2; + border-radius: 4px; + min-width: 8px; +} + +QScrollBar::add-line:horizontal { + margin: 0px 0px 0px 0px; + border-image: url(:/qss_icons/rc/right_arrow_disabled.png); + width: 10px; + height: 10px; + subcontrol-position: right; + subcontrol-origin: margin; +} + +QScrollBar::sub-line:horizontal { + margin: 0px 3px 0px 3px; + border-image: url(:/qss_icons/rc/left_arrow_disabled.png); + height: 10px; + width: 10px; + subcontrol-position: left; + subcontrol-origin: margin; +} + +QScrollBar::add-line:horizontal:hover, +QScrollBar::add-line:horizontal:on { + border-image: url(:/qss_icons/rc/right_arrow.png); + height: 10px; + width: 10px; + subcontrol-position: right; + subcontrol-origin: margin; +} + +QScrollBar::sub-line:horizontal:hover, +QScrollBar::sub-line:horizontal:on { + border-image: url(:/qss_icons/rc/left_arrow.png); + height: 10px; + width: 10px; + subcontrol-position: left; + subcontrol-origin: margin; +} + +QScrollBar::up-arrow:horizontal, +QScrollBar::down-arrow:horizontal { + background: none; +} + +QScrollBar::add-page:horizontal, +QScrollBar::sub-page:horizontal { + background: none; +} + +QScrollBar:vertical { + background-color: #19232D; + width: 16px; + margin: 16px 2px 16px 2px; + border: 1px solid #32414B; + border-radius: 4px; +} + +QScrollBar::handle:vertical { + background-color: #787878; + border: 1px solid #32414B; + min-height: 8px; + border-radius: 4px; +} + +QScrollBar::handle:vertical:hover { + background-color: #148CD2; + border: 1px solid #148CD2; + border-radius: 4px; + min-height: 8px; + +} + +QScrollBar::sub-line:vertical { + margin: 3px 0px 3px 0px; + border-image: url(:/qss_icons/rc/up_arrow_disabled.png); + height: 10px; + width: 10px; + subcontrol-position: top; + subcontrol-origin: margin; +} + +QScrollBar::add-line:vertical { + margin: 3px 0px 3px 0px; + border-image: url(:/qss_icons/rc/down_arrow_disabled.png); + height: 10px; + width: 10px; + subcontrol-position: bottom; + subcontrol-origin: margin; +} + +QScrollBar::sub-line:vertical:hover, +QScrollBar::sub-line:vertical:on { + border-image: url(:/qss_icons/rc/up_arrow.png); + height: 10px; + width: 10px; + subcontrol-position: top; + subcontrol-origin: margin; +} + +QScrollBar::add-line:vertical:hover, +QScrollBar::add-line:vertical:on { + border-image: url(:/qss_icons/rc/down_arrow.png); + height: 10px; + width: 10px; + subcontrol-position: bottom; + subcontrol-origin: margin; +} + +QScrollBar::up-arrow:vertical, +QScrollBar::down-arrow:vertical { + background: none; +} + +QScrollBar::add-page:vertical, +QScrollBar::sub-page:vertical { + background: none; +} + +/* QTextEdit--------------------------------------------------------------- */ + +QTextEdit { + background-color: #19232D; + color: #F0F0F0; + border: 1px solid #32414B; +} + +QTextEdit:hover { + border: 1px solid #148CD2; + color: #F0F0F0; +} + +QTextEdit:selected { + background: #1464A0; + color: #32414B; +} + +/* QPlainTextEdit --------------------------------------------------------- */ + +QPlainTextEdit { + background-color: #19232D; + color: #F0F0F0; + border-radius: 4px; + border: 1px solid #32414B; +} + +QPlainTextEdit:hover { + border: 1px solid #148CD2; + color: #F0F0F0; +} + +QPlainTextEdit:selected { + background: #1464A0; + color: #32414B; +} + +/* QSizeGrip --------------------------------------------------------------- */ + +QSizeGrip { + image: url(:/qss_icons/rc/sizegrip.png); + width: 12px; + height: 12px; +} + +/* QStackedWidget --------------------------------------------------------- */ + +QStackedWidget { + padding: 4px; + border: 1px solid #32414B; + border: 1px solid #19232D; +} + +/* QToolBar --------------------------------------------------------------- */ + +QToolBar { + background-color: #32414B; + border-bottom: 1px solid #19232D; + padding: 2px; + font-weight: bold; +} + +QToolBar QToolButton{ + background-color: #32414B; +} + +QToolBar::handle:horizontal { + width: 6px; + image: url(:/qss_icons/rc/Hmovetoolbar.png); +} + +QToolBar::handle:vertical { + height: 6px; + image: url(:/qss_icons/rc/Vmovetoolbar.png); +} + +QToolBar::separator:horizontal { + width: 3px; + image: url(:/qss_icons/rc/Hsepartoolbar.png); +} + +QToolBar::separator:vertical { + height: 3px; + image: url(:/qss_icons/rc/Vsepartoolbar.png); +} + +QToolButton#qt_toolbar_ext_button { + background: #32414B; + border: 0px; + color: #F0F0F0; + image: url(:/qss_icons/rc/right_arrow.png); +} + +/* QAbstractSpinBox ------------------------------------------------------- */ + +QAbstractSpinBox { + background-color: #19232D; + border: 1px solid #32414B; + color: #F0F0F0; + padding-top: 2px; /* This fix 103, 111*/ + padding-bottom: 2px; /* This fix 103, 111*/ + padding-left: 4px; + padding-right: 4px; + border-radius: 4px; + /* min-width: 5px; removed to fix 109 */ +} + +QAbstractSpinBox:up-button { + background-color: transparent #19232D; + subcontrol-origin: border; + subcontrol-position: top right; + border-left: 1px solid #32414B; + margin: 1px; +} + +QAbstractSpinBox::up-arrow, +QAbstractSpinBox::up-arrow:disabled, +QAbstractSpinBox::up-arrow:off { + image: url(:/qss_icons/rc/up_arrow_disabled.png); + width: 9px; + height: 9px; +} + +QAbstractSpinBox::up-arrow:hover { + image: url(:/qss_icons/rc/up_arrow.png); +} + +QAbstractSpinBox:down-button { + background-color: transparent #19232D; + subcontrol-origin: border; + subcontrol-position: bottom right; + border-left: 1px solid #32414B; + margin: 1px; +} + +QAbstractSpinBox::down-arrow, +QAbstractSpinBox::down-arrow:disabled, +QAbstractSpinBox::down-arrow:off { + image: url(:/qss_icons/rc/down_arrow_disabled.png); + width: 9px; + height: 9px; +} + +QAbstractSpinBox::down-arrow:hover { + image: url(:/qss_icons/rc/down_arrow.png); +} + +QAbstractSpinBox:hover{ + border: 1px solid #148CD2; + color: #F0F0F0; +} + +QAbstractSpinBox:selected { + background: #1464A0; + color: #32414B; +} + +/* ------------------------------------------------------------------------ */ +/* DISPLAYS --------------------------------------------------------------- */ +/* ------------------------------------------------------------------------ */ + +/* QLabel ----------------------------------------------------------------- */ + +QLabel { + background-color: #19232D; + border: 0px solid #32414B; + padding: 2px; + margin: 0px; + color: #F0F0F0 +} + +QLabel::disabled { + background-color: #19232D; + border: 0px solid #32414B; + color: #787878; +} + +/* QTextBrowser ----------------------------------------------------------- */ + +QTextBrowser { + background-color: #19232D; + border: 1px solid #32414B; + color: #F0F0F0; + border-radius: 4px; +} + +QTextBrowser:disabled { + background-color: #19232D; + border: 1px solid #32414B; + color: #787878; + border-radius: 4px; +} + +QTextBrowser:hover, +QTextBrowser:!hover, +QTextBrowser::selected, +QTextBrowser::pressed { + border: 1px solid #32414B; +} + +/* QGraphicsView --------------------------------------------------------- */ + +QGraphicsView { + background-color: #19232D; + border: 1px solid #32414B; + color: #F0F0F0; + border-radius: 4px; +} + +QGraphicsView:disabled { + background-color: #19232D; + border: 1px solid #32414B; + color: #787878; + border-radius: 4px; +} + +QGraphicsView:hover, +QGraphicsView:!hover, +QGraphicsView::selected, +QGraphicsView::pressed { + border: 1px solid #32414B; +} + +/* QCalendarWidget -------------------------------------------------------- */ + +QCalendarWidget { + border: 1px solid #32414B; + border-radius: 4px; +} + +QCalendarWidget:disabled { + background-color: #19232D; + color: #787878; +} + +/* QLCDNumber ------------------------------------------------------------- */ + +QLCDNumber { + background-color: #19232D; + color: #F0F0F0; +} + +QLCDNumber:disabled { + background-color: #19232D; + color: #787878; +} + +/* QProgressBar ----------------------------------------------------------- */ + +QProgressBar { + background-color: #19232D; + border: 1px solid #32414B; + color: #F0F0F0; + border-radius: 4px; + text-align: center; +} + +QProgressBar:disabled { + background-color: #19232D; + border: 1px solid #32414B; + color: #787878; + border-radius: 4px; + text-align: center; +} + +QProgressBar::chunk { + background-color: #1464A0; + color: #19232D; + border-radius: 4px; +} + +QProgressBar::chunk:disabled { + background-color: #14506E; + color: #787878; + border-radius: 4px; +} + + +/* ------------------------------------------------------------------------ */ +/* BUTTONS ---------------------------------------------------------------- */ +/* ------------------------------------------------------------------------ */ + +/* QPushButton ------------------------------------------------------------ */ + +QPushButton { + background-color: #505F69 ; + border: 1px solid #32414B; + color: #F0F0F0; + border-radius: 4px; + padding: 3px; + outline: none; +} + +QPushButton:disabled { + background-color: #32414B; + border: 1px solid #32414B; + color: #787878; + border-radius: 4px; + padding: 3px; +} + + +QPushButton:checked { + background-color: #32414B; + border: 1px solid #32414B; + border-radius: 4px; + padding: 3px; + outline: none; +} + +QPushButton:checked:disabled { + background-color: #19232D; + border: 1px solid #32414B; + color: #787878; + border-radius: 4px; + padding: 3px; + outline: none; +} + +QPushButton::menu-indicator { + subcontrol-origin: padding; + subcontrol-position: bottom right; + bottom: 4px; +} + +QPushButton:pressed { + background-color: #19232D; + border: 1px solid #19232D; +} + +QPushButton:hover, +QPushButton:checked:hover{ + border: 1px solid #148CD2; + color: #F0F0F0; +} + +QPushButton:selected, +QPushButton:checked:selected{ + background: #1464A0; + color: #32414B; +} + +/* QToolButton ------------------------------------------------------------ */ + +QToolButton { + background-color: transparent; + border: 1px solid #32414B; + border-radius: 4px; + margin: 0px; + padding: 2px; +} + +QToolButton:checked { + background-color: #19232D; + border: 1px solid #19232D; +} + +QToolButton:disabled { + border: 1px solid #32414B; +} + +QToolButton:hover, +QToolButton:checked:hover{ + border: 1px solid #148CD2; +} + +/* the subcontrols below are used only in the MenuButtonPopup mode */ + +QToolButton[popupMode="1"] { + padding: 2px; + padding-right: 12px; /* only for MenuButtonPopup */ + border: 1px solid #32414B; /* make way for the popup button */ + border-radius: 4px; +} + +/* The subcontrol below is used only in the InstantPopup or DelayedPopup mode */ + +QToolButton[popupMode="2"] { + padding: 2px; + padding-right: 12px; /* only for InstantPopup */ + border: 1px solid #32414B; /* make way for the popup button */ +} + +QToolButton::menu-button { + padding: 2px; + border-radius: 4px; + border: 1px solid #32414B; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + /* 16px width + 4px for border = 20px allocated above */ + width: 16px; + outline: none; +} + +QToolButton::menu-button:hover, +QToolButton::menu-button:checked:hover { + border: 1px solid #148CD2; +} + +QToolButton::menu-indicator { + image: url(:/qss_icons/rc/down_arrow.png); + top: -8px; /* shift it a bit */ + left: -4px; /* shift it a bit */ +} + +QToolButton::menu-arrow { + image: url(:/qss_icons/rc/down_arrow.png); +} + +QToolButton::menu-arrow:open { + border: 1px solid #32414B; +} + +/* QCommandLinkButton ----------------------------------------------------- */ + +QCommandLinkButton { + background-color: transparent; + border: 1px solid #32414B; + color: #F0F0F0; + border-radius: 4px; + padding: 0px; + margin: 0px; +} + +QCommandLinkButton:disabled { + background-color: transparent; + color: #787878; +} + +/* ------------------------------------------------------------------------ */ +/* INPUTS - NO FIELDS ----------------------------------------------------- */ +/* ------------------------------------------------------------------------ */ + +/* QCombobox -------------------------------------------------------------- */ + +QComboBox { + border: 1px solid #32414B; + border-radius: 4px; + selection-background-color: #1464A0; + padding-top: 2px; /* This fix #103, #111*/ + padding-bottom: 2px; /* This fix #103, #111*/ + padding-left: 4px; + padding-right: 4px; + /* min-width: 75px; removed to fix 109 */ +} + +QComboBox:disabled { + background-color: #19232D; + color: #787878; +} + +QComboBox:hover{ + border: 1px solid #148CD2; +} + +QComboBox:on { + selection-background-color: #19232D; +} + +QComboBox QAbstractItemView { + background-color: #19232D; + border-radius: 4px; + border: 1px solid #32414B; + selection-color: #148CD2; + selection-background-color: #32414B; +} + +QComboBox::drop-down { + subcontrol-origin: padding; + subcontrol-position: top right; + width: 20px; + border-left-width: 0px; + border-left-color: #32414B; + border-left-style: solid; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} + +QComboBox::down-arrow { + image: url(:/qss_icons/rc/down_arrow_disabled.png); +} + +QComboBox::down-arrow:on, +QComboBox::down-arrow:hover, +QComboBox::down-arrow:focus { + image: url(:/qss_icons/rc/down_arrow.png); +} + +/* QSlider ---------------------------------------------------------------- */ + +QSlider:disabled { + background: #19232D; +} + +QSlider:focus { + border: none; +} + +QSlider::groove:horizontal { + background: #32414B; + border: 1px solid #32414B; + height: 4px; + margin: 0px; + border-radius: 4px; +} + +QSlider::sub-page:horizontal { + background: #1464A0; + border: 1px solid #32414B; + height: 4px; + margin: 0px; + border-radius: 4px; +} + +QSlider::sub-page:horizontal:disabled { + background: #14506E; +} + +QSlider::handle:horizontal { + background: #787878; + border: 1px solid #32414B; + width: 8px; + height: 8px; + margin: -8px 0; + border-radius: 4px; +} + +QSlider::handle:horizontal:hover { + background: #148CD2; + border: 1px solid #148CD2; +} + +QSlider::groove:vertical { + background: #32414B; + border: 1px solid #32414B; + width: 4px; + margin: 0px; + border-radius: 4px; +} + +QSlider::sub-page:vertical { + background: #1464A0; + border: 1px solid #32414B; + width: 4px; + margin: 0px; + border-radius: 4px; +} + +QSlider::sub-page:vertical:disabled { + background: #14506E; +} + +QSlider::handle:vertical { + background: #787878; + border: 1px solid #32414B; + width: 8px; + height: 8px; + margin: 0 -8px; + border-radius: 4px; +} + +QSlider::handle:vertical:hover { + background: #148CD2; + border: 1px solid #148CD2; +} + +/* QLine ------------------------------------------------------------------ */ + +QLineEdit { + background-color: #19232D; + padding-top: 2px; /* This QLineEdit fix 103, 111 */ + padding-bottom: 2px; /* This QLineEdit fix 103, 111 */ + padding-left: 4px; + padding-right: 4px; + border-style: solid; + border: 1px solid #32414B; + border-radius: 4px; + color: #F0F0F0; +} + +QLineEdit:disabled { + background-color: #19232D; + color: #787878; +} + +QLineEdit:hover{ + border: 1px solid #148CD2; + color: #F0F0F0; +} + +QLineEdit:selected{ + background: #1464A0; + color: #32414B; +} + +/* QTabWiget -------------------------------------------------------------- */ + +QTabWidget { + padding: 2px; + selection-background-color: #32414B; +} + +QTabWidget QFrame{ + border: 0; +} + +QTabWidget::pane { + border: 1px solid #32414B; + border-radius: 4px; + padding: 2px; + margin: 0px; +} + +QTabWidget::pane:selected { + background-color: #32414B; + border: 1px solid #1464A0; +} + +/* QTabBar ---------------------------------------------------------------- */ + +QTabBar { + qproperty-drawBase: 0; + border-radius: 4px; + margin: 0px; + padding: 2px; + border: 0; + + /* left: 5px; move to the right by 5px - removed for fix */ + } + +QTabBar::close-button { + border: 0; + margin: 2px; + padding: 0; + image: url(:/qss_icons/rc/close.png); +} + +QTabBar::close-button:hover { + image: url(:/qss_icons/rc/close-hover.png); +} + +QTabBar::close-button:pressed { + image: url(:/qss_icons/rc/close-pressed.png); +} + +/* QTabBar::tab - selected ----------------------------------------------- */ + +QTabBar::tab:top:selected:disabled { + border-bottom: 3px solid #14506E; + color: #787878; + background-color: #32414B; +} + +QTabBar::tab:bottom:selected:disabled { + border-top: 3px solid #14506E; + color: #787878; + background-color: #32414B; +} + +QTabBar::tab:left:selected:disabled { + border-left: 3px solid #14506E; + color: #787878; + background-color: #32414B; +} + +QTabBar::tab:right:selected:disabled { + border-right: 3px solid #14506E; + color: #787878; + background-color: #32414B; +} + +/* QTabBar::tab - !selected and disabled ---------------------------------- */ + +QTabBar::tab:top:!selected:disabled { + border-bottom: 3px solid #19232D; + color: #787878; + background-color: #19232D; +} + +QTabBar::tab:bottom:!selected:disabled { + border-top: 3px solid #19232D; + color: #787878; + background-color: #19232D; +} + +QTabBar::tab:left:!selected:disabled { + border-right: 3px solid #19232D; + color: #787878; + background-color: #19232D; +} + +QTabBar::tab:right:!selected:disabled { + border-left: 3px solid #19232D; + color: #787878; + background-color: #19232D; +} + +/* QTabBar::tab - selected ----------------------------------------------- */ + +QTabBar::tab:top:!selected { + border-bottom: 2px solid #19232D; + margin-top: 2px; +} + +QTabBar::tab:bottom:!selected { + border-top: 2px solid #19232D; + margin-bottom: 3px; +} + +QTabBar::tab:left:!selected { + border-left: 2px solid #19232D; + margin-right: 2px; +} + +QTabBar::tab:right:!selected { + border-right: 2px solid #19232D; + margin-left: 2px; +} + + +QTabBar::tab:top { + background-color: #32414B; + color: #F0F0F0; + margin-left: 2px; + padding-left: 4px; + padding-right: 4px; + padding-top: 2px; + padding-bottom: 2px; + min-width: 5px; + border-bottom: 3px solid #32414B; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} + +QTabBar::tab:top:selected { + background-color: #505F69; + color: #F0F0F0; + border-bottom: 3px solid #1464A0; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} + +QTabBar::tab:top:!selected:hover { + border: 1px solid #148CD2; + border-bottom: 3px solid #148CD2; + padding: 0px; +} + +QTabBar::tab:bottom { + color: #F0F0F0; + border-top: 3px solid #32414B; + background-color: #32414B; + margin-left: 2px; + padding-left: 4px; + padding-right: 4px; + padding-top: 2px; + padding-bottom: 2px; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; + min-width: 5px; +} + +QTabBar::tab:bottom:selected { + color: #F0F0F0; + background-color: #505F69; + border-top: 3px solid #1464A0; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; +} + +QTabBar::tab:bottom:!selected:hover { + border: 1px solid #148CD2; + border-top: 3px solid #148CD2; + padding: 0px; +} + +QTabBar::tab:left { + color: #F0F0F0; + background-color: #32414B; + margin-top: 2px; + padding-left: 2px; + padding-right: 2px; + padding-top: 4px; + padding-bottom: 4px; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + min-height: 5px; +} + +QTabBar::tab:left:selected { + color: #F0F0F0; + background-color: #505F69; + border-left: 3px solid #1464A0; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} + +QTabBar::tab:left:!selected:hover { + border: 1px solid #148CD2; + border-left: 3px solid #148CD2; + padding: 0px; +} + +QTabBar::tab:right { + color: #F0F0F0; + background-color: #32414B; + margin-top: 2px; + padding-left: 2px; + padding-right: 2px; + padding-top: 4px; + padding-bottom: 4px; + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + min-height: 5px; +} + +QTabBar::tab:right:selected { + color: #F0F0F0; + background-color: #505F69; + border-right: 3px solid #1464A0; + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; +} + +QTabBar::tab:right:!selected:hover { + border: 1px solid #148CD2; + border-right: 3px solid #148CD2; + padding: 0px; +} + +QTabBar QToolButton::right-arrow:enabled { + image: url(:/qss_icons/rc/right_arrow.png); +} + +QTabBar QToolButton::left-arrow:enabled { + image: url(:/qss_icons/rc/left_arrow.png); +} + +QTabBar QToolButton::right-arrow:disabled { + image: url(:/qss_icons/rc/right_arrow_disabled.png); +} + +QTabBar QToolButton::left-arrow:disabled { + image: url(:/qss_icons/rc/left_arrow_disabled.png); +} + + +/* Some examples from internet to check + +QTabBar::tabButton() and QTabBar::tabIcon() +QTabBar::tear {width: 0px; border: none;} +QTabBar::tear {image: url(tear_indicator.png);} +QTabBar::scroller{width:85pix;} +QTabBar QToolbutton{background-color:"light blue";} + +But that left the buttons transparant. +Looked confusing as the tab buttons migrated behind the scroller buttons. +So we had to color the back ground of the scroller buttons +*/ + +/* QDockWiget ------------------------------------------------------------- */ + +QDockWidget { + outline: 1px solid #32414B; + background-color: #19232D; + border: 1px solid #32414B; + border-radius: 4px; + titlebar-close-icon: url(:/qss_icons/rc/close.png); + titlebar-normal-icon: url(:/qss_icons/rc/undock.png); +} + +QDockWidget::title { + padding: 6px; /* better size for title bar */ + border: none; + background-color: #32414B; +} + +QDockWidget::close-button { + background-color: #32414B; + border-radius: 4px; + border: none; +} + +QDockWidget::close-button:hover { + border: 1px solid #32414B; +} + +QDockWidget::close-button:pressed { + border: 1px solid #32414B; +} + +QDockWidget::float-button { + background-color: #32414B; + border-radius: 4px; + border: none; +} + +QDockWidget::float-button:hover { + border: 1px solid #32414B; +} + +QDockWidget::float-button:pressed { + border: 1px solid #32414B; +} + + +/* QTreeView QTableView QListView ----------------------------------------- */ + +QTreeView:branch:selected, +QTreeView:branch:hover { + background: url(:/qss_icons/rc/transparent.png); +} + +QTreeView::branch:has-siblings:!adjoins-item { + border-image: url(:/qss_icons/rc/transparent.png); +} + +QTreeView::branch:has-siblings:adjoins-item { + border-image: url(:/qss_icons/rc/transparent.png); +} + +QTreeView::branch:!has-children:!has-siblings:adjoins-item { + border-image: url(:/qss_icons/rc/transparent.png); +} + +QTreeView::branch:has-children:!has-siblings:closed, +QTreeView::branch:closed:has-children:has-siblings { + image: url(:/qss_icons/rc/branch_closed.png); +} + +QTreeView::branch:open:has-children:!has-siblings, +QTreeView::branch:open:has-children:has-siblings { + image: url(:/qss_icons/rc/branch_open.png); +} + +QTreeView::branch:has-children:!has-siblings:closed:hover, +QTreeView::branch:closed:has-children:has-siblings:hover { + image: url(:/qss_icons/rc/branch_closed-on.png); +} + +QTreeView::branch:open:has-children:!has-siblings:hover, +QTreeView::branch:open:has-children:has-siblings:hover { + image: url(:/qss_icons/rc/branch_open-on.png); +} + +QListView::item:!selected:hover, +QTreeView::item:!selected:hover, +QTableView::item:!selected:hover, +QColumnView::item:!selected:hover { + outline: 0; + color: #148CD2; + background-color: #32414B; +} + +QListView::item:selected:hover, +QTreeView::item:selected:hover, +QTableView::item:selected:hover, +QColumnView::item:selected:hover { + background: #1464A0; + color: #19232D; +} + +QTreeView::indicator:checked, +QListView::indicator:checked { + image: url(:/qss_icons/rc/checkbox_checked.png); +} + +QTreeView::indicator:unchecked, +QListView::indicator:unchecked { + image: url(:/qss_icons/rc/checkbox_unchecked.png); +} + +QTreeView::indicator:checked:hover, +QTreeView::indicator:checked:focus, +QTreeView::indicator:checked:pressed, +QListView::indicator:checked:hover, +QListView::indicator:checked:focus, +QListView::indicator:checked:pressed { + image: url(:/qss_icons/rc/checkbox_checked_focus.png); +} + +QTreeView::indicator:unchecked:hover, +QTreeView::indicator:unchecked:focus, +QTreeView::indicator:unchecked:pressed, +QListView::indicator:unchecked:hover, +QListView::indicator:unchecked:focus, +QListView::indicator:unchecked:pressed { + image: url(:/qss_icons/rc/checkbox_unchecked_focus.png); +} + +QTreeView::indicator:indeterminate:hover, +QTreeView::indicator:indeterminate:focus, +QTreeView::indicator:indeterminate:pressed, +QListView::indicator:indeterminate:hover, +QListView::indicator:indeterminate:focus, +QListView::indicator:indeterminate:pressed { + image: url(:/qss_icons/rc/checkbox_indeterminate_focus.png); +} + +QTreeView::indicator:indeterminate, +QListView::indicator:indeterminate { + image: url(:/qss_icons/rc/checkbox_indeterminate.png); +} + +QListView, +QTreeView, +QTableView, +QColumnView { + background-color: #19232D; + border: 1px solid #32414B; + color: #F0F0F0; + gridline-color: #32414B; + border-radius: 4px; +} + +QListView:disabled, +QTreeView:disabled, +QTableView:disabled, +QColumnView:disabled { + background-color: #19232D; + color: #787878; +} + +QListView:selected, +QTreeView:selected, +QTableView:selected, +QColumnView:selected { + background: #1464A0; + color: #32414B; +} + +QListView:hover, +QTreeView::hover, +QTableView::hover, +QColumnView::hover { + background-color: #19232D; + border: 1px solid #148CD2; +} + +QListView::item:pressed, +QTreeView::item:pressed, +QTableView::item:pressed, +QColumnView::item:pressed { + background-color: #1464A0; +} + +QListView::item:selected:active, +QTreeView::item:selected:active, +QTableView::item:selected:active, +QColumnView::item:selected:active { + background-color: #1464A0; +} + +QTableCornerButton::section { + background-color: #19232D; + border: 1px transparent #32414B; + border-radius: 0px; +} + +/* QHeaderView ------------------------------------------------------------ */ + +QHeaderView { + background-color: #32414B; + border: 0px transparent #32414B; + padding: 0px; + margin: 0px; + border-radius: 0px; +} + +QHeaderView:disabled { + background-color: #32414B; + border: 1px transparent #32414B; + padding: 2px; +} + +QHeaderView::section { + background-color: #32414B; + color: #F0F0F0; + padding: 2px; + border-radius: 0px; + text-align: left; +} + +QHeaderView::section:checked { + color: #F0F0F0; + background-color: #1464A0; +} + +QHeaderView::section:checked:disabled { + color: #787878; + background-color: #14506E; +} + +QHeaderView::section::horizontal:disabled, +QHeaderView::section::vertical:disabled { + color: #787878; +} + +QHeaderView::section::vertical::first, +QHeaderView::section::vertical::only-one { + border-top: 1px solid #32414B; +} + +QHeaderView::section::vertical { + border-top: 1px solid #19232D; +} + +QHeaderView::section::horizontal::first, +QHeaderView::section::horizontal::only-one { + border-left: 1px solid #32414B; +} + +QHeaderView::section::horizontal { + border-left: 1px solid #19232D; +} + +/* Those settings (border/width/height/background-color) solve bug */ +/* transparent arrow background and size */ + +QHeaderView::down-arrow { + background-color: #32414B; + width: 16px; + height: 16px; + border-right: 1px solid #19232D; + image: url(:/qss_icons/rc/down_arrow.png); +} + +QHeaderView::up-arrow { + background-color: #32414B; + width: 16px; + height: 16px; + border-right: 1px solid #19232D; + image: url(:/qss_icons/rc/up_arrow.png); +} + +/* QToolBox -------------------------------------------------------------- */ + +QToolBox { + padding: 0px; + border: 1px solid #32414B; +} + +QToolBox::selected { + padding: 0px; + border: 2px solid #1464A0; +} + +QToolBox::tab { + background-color: #19232D; + border: 1px solid #32414B; + color: #F0F0F0; + border-top-left-radius: 4px; + border-top-right-radius: 4px; +} + +QToolBox::tab:disabled { + color: #787878; +} + +QToolBox::tab:selected { + background-color: #505F69; + border-bottom: 2px solid #1464A0; +} + +QToolBox::tab:!selected { + background-color: #32414B; + border-bottom: 2px solid #32414B; +} + +QToolBox::tab:selected:disabled { + background-color: #32414B; + border-bottom: 2px solid #14506E; +} + +QToolBox::tab:!selected:disabled { + background-color: #19232D; +} + +QToolBox::tab:hover { + border-color: #148CD2; + border-bottom: 2px solid #148CD2; +} + +QToolBox QScrollArea QWidget QWidget { + padding: 0px; + background-color: #19232D; +} + +/* QFrame ----------------------------------------------------------------- */ + +QFrame { + border-radius: 4px; + border: 1px solid #32414B; +} + +QFrame[frameShape="0"] { + border-radius: 4px; + border: 1px transparent #32414B; +} + +QFrame[height="3"], +QFrame[width="3"] { + background-color: #19232D; +} + +/* QSplitter -------------------------------------------------------------- */ + +QSplitter { + background-color: #32414B; + spacing: 0; + padding: 0; + margin: 0; +} + +QSplitter::separator { + background-color: #32414B; + border: 0 solid #19232D; + spacing: 0; + padding: 1px; + margin: 0; +} + +QSplitter::separator:hover { + background-color: #787878; +} + +QSplitter::separator:horizontal { + width: 5px; + image: url(:/qss_icons/rc/Vsepartoolbar.png); +} + +QSplitter::separator:vertical { + height: 5px; + image: url(:/qss_icons/rc/Hsepartoolbar.png); +} + + +/* QDateEdit-------------------------------------------------------------- */ + +QDateEdit { + selection-background-color: #1464A0; + border-style: solid; + border: 1px solid #32414B; + border-radius: 4px; + padding-top: 2px; /* This fix #103, #111*/ + padding-bottom: 2px; /* This fix #103, #111*/ + padding-left: 4px; + padding-right: 4px; + min-width: 10px; +} + +QDateEdit:on { + selection-background-color: #1464A0; +} + +QDateEdit::drop-down { + subcontrol-origin: padding; + subcontrol-position: top right; + width: 20px; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} + +QDateEdit::down-arrow { + image: url(:/qss_icons/rc/down_arrow_disabled.png); +} + +QDateEdit::down-arrow:on, +QDateEdit::down-arrow:hover, +QDateEdit::down-arrow:focus { + image: url(:/qss_icons/rc/down_arrow.png); +} + +QDateEdit QAbstractItemView { + background-color: #19232D; + border-radius: 4px; + border: 1px solid #32414B; + selection-background-color: #1464A0; +} + +QAbstractView:hover{ + border: 1px solid #148CD2; + color: #F0F0F0; +} + +QAbstractView:selected { + background: #1464A0; + color: #32414B; +} + + diff --git a/src/src.pro b/src/src.pro index f09f6461..26981686 100644 --- a/src/src.pro +++ b/src/src.pro @@ -126,7 +126,8 @@ SOURCES += \ RESOURCES += icons/icons.qrc \ translations/flags/flags.qrc \ translations/translations.qrc \ - certs/CaCerts.qrc + certs/CaCerts.qrc \ + qdarkstyle/style.qrc FORMS += \ MainWindow.ui \ From 20c3e9d97d78a5d1a07dda5a92fc4a77caeb5d2b Mon Sep 17 00:00:00 2001 From: mgrojo Date: Sat, 23 Feb 2019 00:23:12 +0100 Subject: [PATCH 2/5] Set colours using style-sheet in Data Browser tab of Preferences The colours of the frame and text-lines previewing the settings in Data Browser tab need to have being set using a style-sheet, otherwise they are eclipsed by the dark style-sheet when in use. --- src/PreferencesDialog.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/PreferencesDialog.cpp b/src/PreferencesDialog.cpp index c7e1cdad..4fd8b85f 100644 --- a/src/PreferencesDialog.cpp +++ b/src/PreferencesDialog.cpp @@ -473,26 +473,33 @@ void PreferencesDialog::loadColorSetting(QFrame *frame, const QString & settingN void PreferencesDialog::setColorSetting(QFrame *frame, const QColor &color) { QPalette::ColorRole role; + QString style; QLineEdit *line; if (frame == ui->fr_bin_bg) { line = ui->txtBlob; role = line->backgroundRole(); + style = QString("background-color"); } else if (frame == ui->fr_bin_fg) { line = ui->txtBlob; role = line->foregroundRole(); + style = QString("color"); } else if (frame == ui->fr_reg_bg) { line = ui->txtRegular; role = line->backgroundRole(); + style = QString("background-color"); } else if (frame == ui->fr_reg_fg) { line = ui->txtRegular; role = line->foregroundRole(); + style = QString("color"); } else if (frame == ui->fr_null_bg) { line = ui->txtNull; role = line->backgroundRole(); + style = QString("background-color"); } else if (frame == ui->fr_null_fg) { line = ui->txtNull; role = line->foregroundRole(); + style = QString("color"); } else return; @@ -500,9 +507,14 @@ void PreferencesDialog::setColorSetting(QFrame *frame, const QColor &color) palette.setColor(frame->backgroundRole(), color); frame->setPalette(palette); + frame->setStyleSheet(QString("background-color: %2").arg(color.name())); + palette = line->palette(); palette.setColor(role, color); line->setPalette(palette); + + line->setStyleSheet(QString("color: %1; background-color: %2").arg(palette.color(line->foregroundRole()).name(), + palette.color(line->backgroundRole()).name())); } void PreferencesDialog::saveColorSetting(QFrame *frame, const QString & settingName) From e84589b12e75ebc5d998cb125d92de9a05996dfb Mon Sep 17 00:00:00 2001 From: mgrojo Date: Sat, 23 Feb 2019 16:58:23 +0100 Subject: [PATCH 3/5] Reduce (and unify) margins in the main tabs and in Execute SQL widgets The margins have been set to 3 for the layouts of all the main tabs. It has been generally reduced from the default (9), except for the DB Structure which was set to 0 and now has been increased to 3 for uniformity with the other tabs. The margins of interior widgets in Execute SQL tab has also been reduced to 3 from the default. See issues #1762 and #620. --- src/MainWindow.ui | 71 +++++++++++++++++++++++++++++++++++++---- src/SqlExecutionArea.ui | 15 +++++++++ 2 files changed, 79 insertions(+), 7 deletions(-) diff --git a/src/MainWindow.ui b/src/MainWindow.ui index ac039b17..b2854262 100644 --- a/src/MainWindow.ui +++ b/src/MainWindow.ui @@ -19,6 +19,21 @@ + + 3 + + + 3 + + + 3 + + + 3 + + + 3 + @@ -42,19 +57,19 @@ - 4 + 3 - 0 + 3 - 0 + 3 - 0 + 3 - 0 + 3 @@ -109,6 +124,18 @@ You can drag SQL statements from an object row and drop them into other applicat Browse Data + + 3 + + + 3 + + + 3 + + + 3 + @@ -340,6 +367,21 @@ You can drag SQL statements from an object row and drop them into other applicat Edit Pragmas + + 3 + + + 3 + + + 3 + + + 3 + + + 3 + @@ -350,8 +392,8 @@ You can drag SQL statements from an object row and drop them into other applicat 0 0 - 572 - 510 + 596 + 526 @@ -858,6 +900,21 @@ You can drag SQL statements from an object row and drop them into other applicat Execute SQL + + 3 + + + 3 + + + 3 + + + 3 + + + 3 + diff --git a/src/SqlExecutionArea.ui b/src/SqlExecutionArea.ui index 2fb1b085..1435c1ee 100644 --- a/src/SqlExecutionArea.ui +++ b/src/SqlExecutionArea.ui @@ -14,6 +14,21 @@ Form + + 3 + + + 3 + + + 3 + + + 3 + + + 3 + From cc67969d73e42b1aeaa9ee89398523005ee8e127 Mon Sep 17 00:00:00 2001 From: mgrojo Date: Thu, 28 Feb 2019 00:02:47 +0100 Subject: [PATCH 4/5] Update preference colours when the application style is changed In order to have matching colours in all the preferences, the individual colour settings in Data Browser and SQL tabs are reset to default values matching the corresponding style setting (dark stylesheet or follow desktop, which could be dark or light as always). Additionally, several problems with colour settings in QScintilla have been fixed: - We don't use indentation guides - both sets of lexer colour settings must be used, otherwise the result is inconsistant and unpredictable: * lexer->setDefaultColor|Paper and lexer->setColor|Paper --- src/ExtendedScintilla.cpp | 44 +++++++---- src/PreferencesDialog.cpp | 22 ++++++ src/PreferencesDialog.h | 1 + src/PreferencesDialog.ui | 21 +++++ src/Settings.cpp | 158 ++++++++++++++++++++++++-------------- src/Settings.h | 6 +- 6 files changed, 177 insertions(+), 75 deletions(-) diff --git a/src/ExtendedScintilla.cpp b/src/ExtendedScintilla.cpp index 06b7c9a4..656dd352 100644 --- a/src/ExtendedScintilla.cpp +++ b/src/ExtendedScintilla.cpp @@ -125,11 +125,18 @@ void ExtendedScintilla::setLexer(QsciLexer *lexer) { QsciScintilla::setLexer(lexer); - // Set margins to system window theme. setLexer seems to reset these colours. - setMarginsBackgroundColor(QPalette().color(QPalette::Active, QPalette::Window)); - setMarginsForegroundColor(QPalette().color(QPalette::Active, QPalette::WindowText)); - setIndentationGuidesBackgroundColor(QPalette().color(QPalette::Active, QPalette::Window)); - setIndentationGuidesForegroundColor(QPalette().color(QPalette::Active, QPalette::WindowText)); + // Set margins according to settings. setLexer seems to reset these colours. + // Use desktop default colors for margins when following desktop style, or the custom colors otherwise. + switch (Settings::getValue("General", "appStyle").toInt()) { + case Settings::FollowDesktopStyle : + setMarginsBackgroundColor(QPalette().color(QPalette::Active, QPalette::Window)); + setMarginsForegroundColor(QPalette().color(QPalette::Active, QPalette::WindowText)); + break; + case Settings::DarkStyle : + setMarginsBackgroundColor(QColor(Settings::getValue("syntaxhighlighter","background_colour").toString())); + setMarginsForegroundColor(QColor(Settings::getValue("syntaxhighlighter","foreground_colour").toString())); + break; + } } void ExtendedScintilla::reloadKeywords() @@ -145,33 +152,38 @@ void ExtendedScintilla::reloadSettings() } void ExtendedScintilla::reloadLexerSettings(QsciLexer *lexer) { + QColor foreground (Settings::getValue("syntaxhighlighter", "foreground_colour").toString()); + QColor background (Settings::getValue("syntaxhighlighter", "background_colour").toString()); + + QFont defaultfont(Settings::getValue("editor", "font").toString()); + defaultfont.setStyleHint(QFont::TypeWriter); + defaultfont.setPointSize(Settings::getValue("editor", "fontsize").toInt()); + // Set syntax highlighting settings if(lexer) { - QFont defaultfont(Settings::getValue("editor", "font").toString()); - defaultfont.setStyleHint(QFont::TypeWriter); - defaultfont.setPointSize(Settings::getValue("editor", "fontsize").toInt()); lexer->setFont(defaultfont); - lexer->setDefaultColor(QColor(Settings::getValue("syntaxhighlighter", "foreground_colour").toString())); - lexer->setPaper(QColor(Settings::getValue("syntaxhighlighter", "background_colour").toString())); + lexer->setDefaultPaper(background); + lexer->setDefaultColor(foreground); + + // This sets the base colors for all the styles + lexer->setPaper(background); + lexer->setColor(foreground); } // Set font - QFont font(Settings::getValue("editor", "font").toString()); - font.setStyleHint(QFont::TypeWriter); - font.setPointSize(Settings::getValue("editor", "fontsize").toInt()); - setFont(font); + setFont(defaultfont); // Show line numbers - setMarginsFont(font); + setMarginsFont(defaultfont); setMarginLineNumbers(0, true); updateLineNumberAreaWidth(); // Highlight current line setCaretLineVisible(true); setCaretLineBackgroundColor(QColor(Settings::getValue("syntaxhighlighter", "currentline_colour").toString())); - setCaretForegroundColor(QColor(Settings::getValue("syntaxhighlighter", "foreground_colour").toString())); + setCaretForegroundColor(foreground); // Set tab width setTabWidth(Settings::getValue("editor", "tabsize").toInt()); diff --git a/src/PreferencesDialog.cpp b/src/PreferencesDialog.cpp index 4fd8b85f..47b6a1ae 100644 --- a/src/PreferencesDialog.cpp +++ b/src/PreferencesDialog.cpp @@ -41,6 +41,8 @@ PreferencesDialog::PreferencesDialog(QWidget* parent, Tabs tab) loadSettings(); + connect(ui->appStyleCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(adjustColorsToStyle(int))); + // Avoid different heights due to having check boxes or not ui->treeSyntaxHighlighting->setUniformRowHeights(true); @@ -523,6 +525,26 @@ void PreferencesDialog::saveColorSetting(QFrame *frame, const QString & settingN frame->palette().color(frame->backgroundRole())); } +void PreferencesDialog::adjustColorsToStyle(int style) +{ + Settings::AppStyle appStyle = static_cast(style); + setColorSetting(ui->fr_null_fg, Settings::getDefaultColorValue("databrowser", "null_fg_colour", appStyle)); + setColorSetting(ui->fr_null_bg, Settings::getDefaultColorValue("databrowser", "null_bg_colour", appStyle)); + setColorSetting(ui->fr_bin_fg, Settings::getDefaultColorValue("databrowser", "bin_fg_colour", appStyle)); + setColorSetting(ui->fr_bin_bg, Settings::getDefaultColorValue("databrowser", "bin_bg_colour", appStyle)); + setColorSetting(ui->fr_reg_fg, Settings::getDefaultColorValue("databrowser", "reg_fg_colour", appStyle)); + setColorSetting(ui->fr_reg_bg, Settings::getDefaultColorValue("databrowser", "reg_bg_colour", appStyle)); + + for(int i=0; i < ui->treeSyntaxHighlighting->topLevelItemCount(); ++i) + { + QString name = ui->treeSyntaxHighlighting->topLevelItem(i)->text(0); + QColor color = Settings::getDefaultColorValue("syntaxhighlighter", name + "_colour", appStyle); + ui->treeSyntaxHighlighting->topLevelItem(i)->setTextColor(2, color); + ui->treeSyntaxHighlighting->topLevelItem(i)->setBackgroundColor(2, color); + ui->treeSyntaxHighlighting->topLevelItem(i)->setText(2, color.name()); + } +} + void PreferencesDialog::activateRemoteTab(bool active) { ui->tabWidget->setTabEnabled(ui->tabWidget->indexOf(ui->tabRemote), active); diff --git a/src/PreferencesDialog.h b/src/PreferencesDialog.h index b3aa4550..067f4b9b 100644 --- a/src/PreferencesDialog.h +++ b/src/PreferencesDialog.h @@ -45,6 +45,7 @@ private slots: void removeClientCertificate(); void chooseRemoteCloneDirectory(); void updatePreviewFont(); + void adjustColorsToStyle(int style); void on_buttonManageFileExtension_clicked(); void on_buttonBox_clicked(QAbstractButton* button); diff --git a/src/PreferencesDialog.ui b/src/PreferencesDialog.ui index 3615a50b..623c3440 100644 --- a/src/PreferencesDialog.ui +++ b/src/PreferencesDialog.ui @@ -509,6 +509,9 @@ 0 + + When this value is changed, all the other color preferences are also set to matching colors. + 0 @@ -873,6 +876,9 @@ Can be set to 0 for disabling completion. Qt::StrongFocus + + Click to set this color + true @@ -899,6 +905,9 @@ Can be set to 0 for disabling completion. Qt::StrongFocus + + Click to set this color + true @@ -925,6 +934,9 @@ Can be set to 0 for disabling completion. Qt::StrongFocus + + Click to set this color + true @@ -941,6 +953,9 @@ Can be set to 0 for disabling completion. Qt::StrongFocus + + Click to set this color + true @@ -957,6 +972,9 @@ Can be set to 0 for disabling completion. Qt::StrongFocus + + Click to set this color + true @@ -973,6 +991,9 @@ Can be set to 0 for disabling completion. Qt::StrongFocus + + Click to set this color + true diff --git a/src/Settings.cpp b/src/Settings.cpp index dd7387be..6dcb123a 100644 --- a/src/Settings.cpp +++ b/src/Settings.cpp @@ -215,18 +215,8 @@ QVariant Settings::getDefaultValue(const QString& group, const QString& name) return "\\"; if(name == "filter_delay") return 200; - if(name == "null_fg_colour") - return QColor(Qt::lightGray).name(); - if(name == "null_bg_colour") - return QPalette().color(QPalette::Active, QPalette::Base).name(); - if(name == "reg_fg_colour") - return QPalette().color(QPalette::Active, QPalette::Text).name(); - if(name == "reg_bg_colour") - return QPalette().color(QPalette::Active, QPalette::Base).name(); - if(name == "bin_fg_colour") - return QColor(Qt::lightGray).name(); - if(name == "bin_bg_colour") - return QPalette().color(QPalette::Active, QPalette::Base).name(); + if(name.right(6) == "colour") + return getDefaultColorValue(group, name, FollowDesktopStyle); } // syntaxhighlighter? @@ -246,52 +236,7 @@ QVariant Settings::getDefaultValue(const QString& group, const QString& name) // Colour? if(name.right(6) == "colour") - { - QColor backgroundColour = QPalette().color(QPalette::Active, QPalette::Base); - QColor foregroundColour = QPalette().color(QPalette::Active, QPalette::Text); - - if(name == "foreground_colour") - return foregroundColour.name(); - else if(name == "background_colour") - return backgroundColour.name(); - - // Detect and provide sensible defaults for dark themes - if (backgroundColour.value() < foregroundColour.value()) { - if(name == "keyword_colour") - return QColor(82, 148, 226).name(); - else if(name == "function_colour") - return QColor(Qt::yellow).name(); - else if(name == "table_colour") - return QColor(Qt::cyan).name(); - else if(name == "comment_colour") - return QColor(Qt::green).name(); - else if(name == "identifier_colour") - return QColor(Qt::magenta).name(); - else if(name == "string_colour") - return QColor(Qt::lightGray).name(); - else if(name == "currentline_colour") - return backgroundColour.lighter(150).name(); - else if(name == "background_colour") - return backgroundColour.name(); - } else { - if(name == "keyword_colour") - return QColor(Qt::darkBlue).name(); - else if(name == "function_colour") - return QColor(Qt::blue).name(); - else if(name == "table_colour") - return QColor(Qt::darkCyan).name(); - else if(name == "comment_colour") - return QColor(Qt::darkGreen).name(); - else if(name == "identifier_colour") - return QColor(Qt::darkMagenta).name(); - else if(name == "string_colour") - return QColor(Qt::red).name(); - else if(name == "currentline_colour") - return QColor(236, 236, 245).name(); - else if(name == "background_colour") - return backgroundColour.name(); - } - } + return getDefaultColorValue(group, name, FollowDesktopStyle); } // editor/font? @@ -398,6 +343,103 @@ QVariant Settings::getDefaultValue(const QString& group, const QString& name) return QVariant(); } +QColor Settings::getDefaultColorValue(const QString& group, const QString& name, AppStyle style) +{ + // Data Browser/NULL & Binary Fields + if(group == "databrowser") + { + switch (style) { + case FollowDesktopStyle : + if(name == "null_fg_colour") + return QColor(Qt::lightGray).name(); + if(name == "null_bg_colour") + return QPalette().color(QPalette::Active, QPalette::Base).name(); + if(name == "reg_fg_colour") + return QPalette().color(QPalette::Active, QPalette::Text).name(); + if(name == "reg_bg_colour") + return QPalette().color(QPalette::Active, QPalette::Base).name(); + if(name == "bin_fg_colour") + return QColor(Qt::lightGray).name(); + if(name == "bin_bg_colour") + return QPalette().color(QPalette::Active, QPalette::Base).name(); + case DarkStyle : + if(name == "null_fg_colour") + return QColor("#787878"); + if(name == "null_bg_colour") + return QColor("#19232D"); + if(name == "reg_fg_colour") + return QColor("#F0F0F0"); + if(name == "reg_bg_colour") + return QColor("#19232D"); + if(name == "bin_fg_colour") + return QColor("#787878"); + if(name == "bin_bg_colour") + return QColor("#19232D"); + } + } + + // syntaxhighlighter? + if(group == "syntaxhighlighter") + { + // Colour? + if(name.right(6) == "colour") + { + QColor backgroundColour; + QColor foregroundColour; + switch (style) { + case FollowDesktopStyle : + backgroundColour = QPalette().color(QPalette::Active, QPalette::Base); + foregroundColour = QPalette().color(QPalette::Active, QPalette::Text); + break; + case DarkStyle : + foregroundColour = QColor("#F0F0F0"); + backgroundColour = QColor("#19232D"); + break; + } + if(name == "foreground_colour") + return foregroundColour; + else if(name == "background_colour") + return backgroundColour; + + // Detect and provide sensible defaults for dark themes + if (backgroundColour.value() < foregroundColour.value()) { + if(name == "keyword_colour") + return QColor(82, 148, 226); + else if(name == "function_colour") + return QColor(Qt::yellow); + else if(name == "table_colour") + return QColor(Qt::cyan); + else if(name == "comment_colour") + return QColor(Qt::green); + else if(name == "identifier_colour") + return QColor(Qt::magenta); + else if(name == "string_colour") + return QColor(Qt::lightGray); + else if(name == "currentline_colour") + return backgroundColour.lighter(150); + } else { + if(name == "keyword_colour") + return QColor(Qt::darkBlue); + else if(name == "function_colour") + return QColor(Qt::blue); + else if(name == "table_colour") + return QColor(Qt::darkCyan); + else if(name == "comment_colour") + return QColor(Qt::darkGreen); + else if(name == "identifier_colour") + return QColor(Qt::darkMagenta); + else if(name == "string_colour") + return QColor(Qt::red); + else if(name == "currentline_colour") + return QColor(236, 236, 245); + } + } + } + + // Unknown combination of group and name? Return an invalid QColor! + return QColor(); +} + void Settings::restoreDefaults () { QSettings settings(QApplication::organizationName(), QApplication::organizationName()); diff --git a/src/Settings.h b/src/Settings.h index 6218b80c..9c3542f4 100644 --- a/src/Settings.h +++ b/src/Settings.h @@ -21,9 +21,13 @@ public: private: Settings() { } // class is fully static - // This works similar to getSettingsValue but returns the default value instead of the value set by the user + // This works similar to getValue but returns the default value instead of the value set by the user static QVariant getDefaultValue(const QString& group, const QString& name); + // This works similar to getDefaultValue but returns the default color value based on the passed application style + // instead of the current palette. + static QColor getDefaultColorValue(const QString& group, const QString& name, AppStyle style); + // Cache for storing the settings to avoid repeatedly reading the settings file all the time static QHash m_hCache; }; From 1a90acc52f2e350f8a244f12e417ed863deedf80 Mon Sep 17 00:00:00 2001 From: mgrojo Date: Fri, 1 Mar 2019 20:45:23 +0100 Subject: [PATCH 5/5] Add license of ColinDuquesnoy/QDarkStyleSheet --- src/qdarkstyle/LICENSE.md | 185 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 src/qdarkstyle/LICENSE.md diff --git a/src/qdarkstyle/LICENSE.md b/src/qdarkstyle/LICENSE.md new file mode 100644 index 00000000..f8714d07 --- /dev/null +++ b/src/qdarkstyle/LICENSE.md @@ -0,0 +1,185 @@ +# License + +This is the license of [QDarkStyleSheet](https://github.com/ColinDuquesnoy/QDarkStyleSheet). + +## The MIT License (MIT) - Code + +Copyright (c) 2013-2018 Colin Duquesnoy + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +## Creative Commons Attribution International 4.0 - Images + +QDarkStyle (c) 2013-2018 Colin Duquesnoy + +Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. + +### Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. + +* __Considerations for licensors:__ Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors). + +* __Considerations for the public:__ By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees). + +## Creative Commons Attribution 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. + +### Section 1 – Definitions + +a. __Adapted Material__ means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. + +b. __Adapter's License__ means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. + +c. __Copyright and Similar Rights__ means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + +d. __Effective Technological Measures__ means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. + +e. __Exceptions and Limitations__ means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. + +f. __Licensed Material__ means the artistic or literary work, database, or other material to which the Licensor applied this Public License. + +g. __Licensed Rights__ means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. + +h. __Licensor__ means the individual(s) or entity(ies) granting rights under this Public License. + +i. __Share__ means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. + +j. __Sui Generis Database Rights__ means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. + +k. __You__ means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. + +### Section 2 – Scope + +a. ___License grant.___ + + 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: + + A. reproduce and Share the Licensed Material, in whole or in part; and + + B. produce, reproduce, and Share Adapted Material. + + 2. __Exceptions and Limitations.__ For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. + + 3. __Term.__ The term of this Public License is specified in Section 6(a). + + 4. __Media and formats; technical modifications allowed.__ The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. + + 5. __Downstream recipients.__ + + A. __Offer from the Licensor – Licensed Material.__ Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. + + B. __No downstream restrictions.__ You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. + + 6. __No endorsement.__ Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). + +b. ___Other rights.___ + + 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this Public License. + + 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. + +### Section 3 – License Conditions + +Your exercise of the Licensed Rights is expressly made subject to the following conditions. + +a. ___Attribution.___ + + 1. If You Share the Licensed Material (including in modified form), You must: + + A. retain the following if it is supplied by the Licensor with the Licensed Material: + + i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of warranties; + + v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + + B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and + + C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. + + 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. + + 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. + +### Section 4 – Sui Generis Database Rights + +Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: + +a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; + +b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and + +c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. + +### Section 5 – Disclaimer of Warranties and Limitation of Liability + +a. __Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.__ + +b. __To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.__ + +c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. + +### Section 6 – Term and Termination + +a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. + +b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. + +c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. + +d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + +### Section 7 – Other Terms and Conditions + +a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. + +b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. + +### Section 8 – Interpretation + +a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. + +b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. + +c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. + +d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. + +> Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](http://creativecommons.org/policies), Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. +> +> Creative Commons may be contacted at creativecommons.org