Skip to content

Commit

Permalink
theming: a step more
Browse files Browse the repository at this point in the history
Add page of overview
We can add as many pages as we like (1 for all or 1 for each thing/section)
Label names to be addressed at a later date (label, label_2, etc.)
  • Loading branch information
TheComputerGenie committed Feb 13, 2024
1 parent fe79e9d commit 5fa18f5
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/qt/komodo.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
<qresource prefix="/themes">
<file alias="global">res/themes/global.qss</file>
<file alias="pulled">res/themes/pulled.qss</file>
<file alias="overview">res/themes/overview.qss</file>
</qresource>
<qresource prefix="/movies">
<file alias="spinner-000">res/movies/spinner-000.png</file>
Expand Down
5 changes: 3 additions & 2 deletions src/qt/komodooceangui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,10 @@ KomodoOceanGUI::KomodoOceanGUI(const PlatformStyle *_platformStyle, const Networ
usedSendingAddressesAction->setVisible(true);
usedReceivingAddressesAction->setVisible(true);
}
std::string StyleSheetNames[2] = { "global", "pulled" };
std::string StyleSheetNames[3] = { "global", "pulled", "overview" };
int StyleSheetCount = sizeof(StyleSheetNames) / sizeof(StyleSheetNames[0]);
QString ThisStyleSheet;
for (int i = 0; i < 2; i++) {
for (int i = 0; i < StyleSheetCount; i++) {
QFile styleFile;
styleFile.setFileName (":/themes/" + QString::fromStdString(StyleSheetNames[i]));
styleFile.open(QFile::ReadOnly);
Expand Down
5 changes: 5 additions & 0 deletions src/qt/res/themes/global.qss
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ QMenu::item:selected{
background-color: darkgreen;
color: white;
}
/* this is just lazy; but, lazy is as lazy does */
QLabel#label, QLabel#label_2, QLabel#label_3, QLabel#label_4, QLabel#label_5, QLabel#label_6, QLabel#label_7 {
color: black;
font-weight: bold;
}
44 changes: 44 additions & 0 deletions src/qt/res/themes/overview.qss
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/* Overview Page */
QFrame QLabel#labelBalanceText,
QFrame QLabel#titleNumTransactions,
QFrame QLabel#labelImmatureText,
QFrame QLabel#labelUnconfirmedText,
QFrame QLabel#labelPendingText,
QFrame QLabel#labelInterestTotalText,
QFrame QLabel#labelPrivateTotalText,
QFrame QLabel#labelTotalText {
color: black;
font-size: 20px;
}

QFrame QLabel#labelBalance,
QFrame QLabel#labelPrivateBalance,
QFrame QLabel#labelNumTransactions,
QFrame QLabel#labelImmature,
QFrame QLabel#labelUnconfirmed,
QFrame QLabel#labelInterestBalance,
QFrame QLabel#labelTotal {
color: darkGreen;
font-weight: normal;
font-size: 20px;
}

QFrame QLabel#labelSpendable,
QFrame QLabel#labelWatchonly {
color: darkGrey;
font-size: 16px;
}
/* "Balances" and "Recent transactions" */
#OverviewPage QLabel#label_6, #OverviewPage QLabel#label_4 {
color: green;
font-size: 18px;
font-weight: bold;
text-decoration: underline;
}
/* horizontal line */
#OverviewPage QFrame[frameShape="4"]
{
background: darkGrey;
height: 3px;
}
/* End Overview Page */
5 changes: 4 additions & 1 deletion src/qt/res/themes/pulled.qss
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ QComboBox { combobox-popup: 0; }
/* Error status based on setProperty */
QLabel[urgent=true] { color: red; }
QLabel[urgent=false] { color: black; }
QLabel[waiting=true] { color: tomato; }
QLabel[passing=true] { color: green; }
QLabel[waiting=true] {
color: tomato;
font-weight: bold;
}

/* this isn't pulled, but here as a reminder from when taking care of html */
#messagesWidget { background-color: white; }
Expand Down

0 comments on commit 5fa18f5

Please sign in to comment.