Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GUI][CSS] Refactored Dark Mode #933

Open
wants to merge 70 commits into
base: master
Choose a base branch
from

Conversation

Rock-N-Troll
Copy link

@Rock-N-Troll Rock-N-Troll commented Apr 20, 2021

  • Still applying stylings
  • Checkbox in Preferences to enable or disable Dark mode (requires wallet shutdown/restart)
    image

New Text color change (will require icon to be copied and recolored):
image

Previous Text color unchanged:
image

image

image

@Rock-N-Troll
Copy link
Author

Rock-N-Troll commented Apr 26, 2021

Wallet is ready for testing. I expect there to be some potential styling/formatting changes requested but otherwise the first working version of dark theme is here (FAQ tab pop-up has some issues)

@Rock-N-Troll Rock-N-Troll changed the title [WIP][GUI][CSS] Refactored Dark Mode [GUI][CSS] Refactored Dark Mode Apr 26, 2021
@Rock-N-Troll Rock-N-Troll marked this pull request as draft April 27, 2021 21:40
@Rock-N-Troll Rock-N-Troll marked this pull request as ready for review April 27, 2021 21:40
@seanPhill
Copy link
Collaborator

Dark mode colours are very nice!
Screens remaining to do dark mode?
• Debug Window tabs.
Screen Shot 2021-04-29 at 4 17 28 pm
• Coin Control
• "Signatures - Sign / Verify a Message" window

@seanPhill
Copy link
Collaborator

seanPhill commented Apr 29, 2021

Anomalies in Light Mode: (Note: My Mac is set to Dark Mode, while the wallet is set to Light Mode.)

  • Grey shaded box around "Select an option below" at Create or Restore wallet screen
    Screen Shot 2021-04-26 at 8 02 43 am
  • Grey shaded box around the number 1 in the seed phrase screens (for new wallet or for restore wallet)
    Screen Shot 2021-04-26 at 8 03 19 am
    Screen Shot 2021-04-26 at 8 11 47 am
    Screen Shot 2021-04-26 at 8 12 11 am

@seanPhill
Copy link
Collaborator

Anomaly in Dark Mode:
Send window, Address selection window in dark mode some explanatory text cannot be read.
Screen Shot 2021-04-29 at 5 56 13 pm
Compare the light mode equivalent.
Screen Shot 2021-04-26 at 10 19 07 am

@seanPhill
Copy link
Collaborator

Other anomaly in Dark Mode (only experienced at wallet creation or restore).
The same grey rectangle anomaly shown earlier in Light Mode exists in the equivalent in Dark Mode. (I expect the same fix will fix both.)

@CaveSpectre11
Copy link
Collaborator

I'm okay with multiple commits given the scale of this, but there is going to be some definite rebasing to squash the placeholder commits. e.g.

image

@Rock-N-Troll
Copy link
Author

I will definitely be squashing most if not all of the commits. This is a wallet-wide change that touches just about every gui page.

@seanPhill seanPhill requested review from Zannick and removed request for codeofalltrades and WetOne June 25, 2022 18:00
@seanPhill
Copy link
Collaborator

I'd be interested in having another look at this one some time, to not waste the work, and because I have appreciated the results of this Dark Mode style. So, when you're ready, just say the word.

}
return QString();

if(fileDark.open(QFile::ReadOnly) && isDarkModeSet){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: please use consistent style for spacing and indentation here. I prefer space after if and before { and 4-space indents (Github seems to round tabs to 4 or 8 spaces depending on space before them).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will likely not be getting to this PR anytime soon but commenting as noted.

@@ -550,6 +550,7 @@ void OverviewPage::showEvent(QShowEvent *event){
if (fHide != filter->orphansHidden())
hideOrphans(fHide);

/*
QGraphicsOpacityEffect *eff = new QGraphicsOpacityEffect(this);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and several other (animation?) effects have been remarked out in this PR. Was this a debugging change, or is there a reason to remove these?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If i remember correctly, this was because the animation is clashing with the styling (causes flicker or just looks bad and is unnecessary). If you add it back in, would just need an eyeball check as it is all cosmetic changes.

@@ -49,7 +49,7 @@ SplashScreenVeil::SplashScreenVeil(interfaces::Node& node, Qt::WindowFlags f, co
this->setStyleSheet(GUIUtil::loadStyleSheet());

this->resize(800, 514);
ui->frame->setStyleSheet("#frame{border-image: url(\":/icons/splash_background\") 0 0 0 0 stretch stretch;padding: 0;margin: 0;}");
//ui->frame->setStyleSheet("#frame{border-image: url(\":/icons/splash_background\") 0 0 0 0 stretch stretch;padding: 0;margin: 0;}");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Author

@Rock-N-Troll Rock-N-Troll Jul 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we are setting the stylesheet here and the whole purpose is the stylings are now in css instead of being handled in the code. It should have a matching styling in the css files.


QPoint pos = mainWindow->getGUI()->mapFromGlobal(QCursor::pos());

if(pos.x()+menu->width()>mainWindow->getGUI()->width()){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: spacing

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will likely not be getting to this PR anytime soon but commenting as noted.

const QString constType = type;
if(!this->menu) this->menu = new AddressesMenu(constType , updatedIndex, this, this->mainWindow, this->model);
if(!this->menu) this->menu = new AddressesMenu(constType , updatedIndex, mainWindow->getGUI(), this->mainWindow, this->model);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(!this->menu) this->menu = new AddressesMenu(constType , updatedIndex, mainWindow->getGUI(), this->mainWindow, this->model);
if (!this->menu)
this->menu = new AddressesMenu(constType, updatedIndex, mainWindow->getGUI(), this->mainWindow, this->model);

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will likely not be getting to this PR anytime soon but commenting as noted.

Copy link
Collaborator

@Zannick Zannick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK d28da77

We can address nits in a followup; I was going to do them myself but it seems inappropriate for me to then review my own commit.

@seanPhill
Copy link
Collaborator

I'll have to retest this PR. I'd like to see it released, and the other @Rock-N-Troll PRs need to be considered, including #926.

@seanPhill seanPhill added the QA: Pending QA is waiting a response/confirmation from developers label Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: GUI Primarily related to the display of the user interface Dev Status: In Progress Someone is actively working on this issue. QA: Pending QA is waiting a response/confirmation from developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants