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: Refresh UI styles and sidebar/statusbar design #2102

Merged
merged 14 commits into from
Apr 17, 2021

Conversation

cyrossignol
Copy link
Member

@cyrossignol cyrossignol commented Apr 12, 2021

This continues from #2096 to implement some more low-hanging fruit for the proposed GUI improvements (#847). I updated the styles for the basic UI components and redesigned the sidebar and status bar for the light and dark themes. This PR does not change the structure of the application's content.

This is a face-lift and not a replacement for work needed to properly re-implement the GUI with a tool more suitable for the full set of proposed improvements in #847 (preferably Qt Quick/QML), and I do not want to claim part of the attached bounty (#1401). I'm just tired of waiting for that work to finish and tired of the current GUI appearance. Gridcoin loses a degree of credibility with a UI that looks like it was created a decade or two ago.

Please read the commit descriptions for information about the changes. I pulled-in @opsinphark's switch to Inter's variable font from #1926 for the additional weights used in the new styles (and I can't shake the revulsion I feel toward the hinted appearance). I drew a new scraper icon design because the new assets don't include these resources. I also removed the "native" theme because we don't have new assets to properly support it yet on both light- and dark-mode desktops. I will rebuild it in the future if needed.

For the scope of the changes in this PR, I only updated a subset of the icons (mostly related to the toolbars) from the new assets. I will finish installing and cleaning up the rest of the application's icons in a subsequent PR.

Closes #1349. And should resolve at least part of #2073.


image

image

image

image

image

image

image

image

image

image


image

image

image

image

image

image

image

image

image

image

opsinphark and others added 2 commits April 12, 2021 12:18
 - This file includes all glyphs, variation axes and named styles
   where the constant files did not.  This should also cut down on
   final compilation size.
   Glyph Count:
     2537
   Variation Axes:
     Weight: 100 - 900, default 400
     Slant: -10 - 0, default 0
   Named Styles:
     Thin, Thin Italic, ExtraLight, ExtraLight Italic, Light,
     Light Italic, Regular, Italic, Medium, Medium Italic, SemiBold,
     SemiBold Italic, Bold, Bold Italic, ExtraBold, ExtraBold Italic,
     Black, Black Italic
Qt paints some decorations directly and provides no stylesheet hooks to
customize appearance (for example: the rulers in a QWizardPage). We set
certain application palette colors to fully-transparent to render these
aspects invisible so that the painted features do not clash with visual
designs of the application's themes.
@jamescowens
Copy link
Member

Need to fix the icon scaling...
image

@jamescowens
Copy link
Member

I like the dark theme a lot. I am also happy we are eliminating the native theme. It is nothing but trouble. We should support only light and dark. The light theme seems out of balance to me. The purple is too dark on the left compared to the light on the right....

@cyrossignol
Copy link
Member Author

@jamescowens I agree—the top menu bar breaks the visual flow which is a lot more noticeable on the light theme because of the different background color. I thought about moving the menu bar as in the following to improve the balance (and save a bit of space):

image

As far as colors go, we can't really lighten the toolbar without pushing the contrast ratio past the accessibility edge that it's already sitting on. Darkening the content changes the proposed design significantly which may cause problems if we need to use this as a base for any of the other changes in the future. I imagine that the colors will make more sense when the full redesign is finished. They look ok in the mock ups.

I'm taking a look at the icon scaling.

@RoboticMind
Copy link
Contributor

Love the changes overall

Noticed something kind of minor, but the columns on the Home page should probably be the same height. Right now the addresses thing goes down further than the column with the beacon button.

image

@presciencia
Copy link

Wow it looks great! I can not wait! I tried to start this project also but it is very difficult but for you it is "low hanging fruit" lol :)

I think the menus look better moved to side layout also.

What if the dark mode is the default? It can make better branding for cool factor :)

I see left side bar BOINC logo in the link mock up. Is it missing?

@jamescowens
Copy link
Member

I fixed the icon scaling originally in this PR...
#1911

@cyrossignol
Copy link
Member Author

cyrossignol commented Apr 13, 2021

Yes. I started that way, but I tried to exploit the declarative features of the stylesheets to avoid all the extra logic bloat needed for the hover/active states that these have now. Unfortunately, Qt doesn't seem to render high-DPI background images consistently across different platforms, so I'm going to put it back to the way I had it before.

@cyrossignol
Copy link
Member Author

What if the dark mode is the default? It can make better branding for cool factor :)

@presciencia I'm not opposed to that. I kind of like the idea of dark-by-default.

I see left side bar BOINC logo in the link mock up. Is it missing?

Whoops. Forgot about it... Thanks!

@jamescowens
Copy link
Member

jamescowens commented Apr 13, 2021

Yep. Unfortunately the style sheets are buggy. The convenience they provide is negated when they don't work properly across various DPI ranges/platforms.

@jamescowens
Copy link
Member

@cyrossignol you might try messing with this again in bitcoin.cpp:242...

// Generate high-dpi pixmaps
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);

#if QT_VERSION >= 0x050600 && !defined(WIN32)
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif

@jamescowens
Copy link
Member

jamescowens commented Apr 13, 2021

One other comment. I don't think we should be afraid of using green to indicate good status on some of the status icons at the bottom. The staking and scraper icons are grey when good, and yellow or red when bad. I think they should be green when good, consistent with the in sync icon.

@jamescowens
Copy link
Member

I think the grey normal text in the light mode should be made a little darker. It looks "weak" to me.

@cyrossignol
Copy link
Member Author

cyrossignol commented Apr 14, 2021

One other comment. I don't think we should be afraid of using green to indicate good status on some of the status icons at the bottom. The staking and scraper icons are grey when good, and yellow or red when bad. I think they should be green when good, consistent with the in sync icon.

I disagree. Colors in status indicators for a UI should be used to draw the user's attention, not as a decoration. Items in a nominal state don't need to be emphasized as such. For example, the scraper icon is probably irrelevant to 99% of the folks using the wallet until a problem occurs. I don't like the green "cloud" icon for the sync indicator from the new assets, and I suggest that we change it to a neutral tone. I think the designer meant to use green to convey the completion of a successful sync, but it's not helpful to color the icon after the initial download. The rainbow of icons in the old status bar made it hard to catch important information.

On a related note, I will update the supplied beacon icons to make the colors more obvious. Qt doesn't render the SVG filters in this set, so it's hard to notice color changes of the dot in the middle.

I think the grey normal text in the light mode should be made a little darker. It looks "weak" to me.

I agree here. I'll bump them down some more. This PR already darkens the colors more than they were in the original blueprint, but I don't like the result yet either.

@cyrossignol
Copy link
Member Author

I think I fixed the high-DPI scaling issue for the sidebar icons. @jamescowens, could you please double check? 🙂

@jamescowens
Copy link
Member

I get what you are saying about the icon color, and agree if you are being consistent with your thought, that the in sync icon should be grey if in sync, not green. There is only one problem. The network connection icon violates these principles and is always grey, and in a no connection setting the three radial bars are light grey... lighter than the dark grey when the connections are good. Not exactly attention getting for the situation where the connection count is low. That is precisely why the shorter bars in the old icon I made orange and then red...

@jamescowens
Copy link
Member

jamescowens commented Apr 14, 2021

I suppose by convention it is similar to what is on phones now.... I think the icon needs to change when there are no connections, much like on Windows.

@jamescowens
Copy link
Member

The icon scaling is better...
image

@cyrossignol
Copy link
Member Author

I get what you are saying about the icon color, and agree if you are being consistent with your thought, that the in sync icon should be grey if in sync, not green. There is only one problem. The network connection icon violates these principles and is always grey, and in a no connection setting the three radial bars are light grey... lighter than the dark grey when the connections are good. Not exactly attention getting for the situation where the connection count is low. That is precisely why the shorter bars in the old icon I made orange and then red...

Ah, you're right, I agree. The connections icon should change color for a no/low peer count. I'll give it a tweak. The sync icon does turn red already for "stalled" when the wallet has no connections.

I don't mean to sound heavy-handed about the icon colors. If people like green, we can swap those in. It's my personal taste to avoid the visual noise. I think @madmaxpayne did a great job with the proposed icon choices.

@cyrossignol
Copy link
Member Author

Could also compromise and put some green as a flair. I think I prefer it without, though.

image

@nathanielcwm
Copy link
Contributor

nathanielcwm commented Apr 14, 2021

I think it would be nicer if the purple on the left column extended all the way to the bottom.

Additionally I personally don't like how rounded the buttons are (but it's possibly just because of how blown up they are in the images, prolly looks fine if it's in their actual sizes). I believe sharp corners fit better with other Windows programs.

I believe that not having the bottom area at all and integrating the icons into the blank areas above would look superior (unless you're planning to add polls and stuff to the bottom like in the mockup). Looks a lot better on Macs like the mockups tho.

@nathanielcwm
Copy link
Contributor

I believe @ZigzagoonBalloon was also working on this independantly?

@ZigzagoonBalloon
Copy link

ZigzagoonBalloon commented Apr 14, 2021

Yep! Though as I've explained uni started up again and is pretty much my main time commitment. Unfortunately it will probably remain this way until November when I graduate/summer break starts but I'll definitely come back to it then.
I'd estimate the QML part is ~60% done and then it has to be integrated into the wallet. You can build it and play with it yourself here, though obviously it's a WIP and there's lots I need to come back to.
https://github.com/ZiggySchulz/gridcoin-wallet-GUI-rewrite

Edit: To clarify I am working on the new GUI but it's completely new as Jim explains below

@jamescowens
Copy link
Member

What @ZigzagoonBalloon is doing is different than this. It may look similar, but it uses QML, which is different Qt frontend than the traditional frontend that we are using. @cyrossignol is just making changes to the existing front end. As he said it is a stopgap.

@presciencia
Copy link

I think green icons for all is overkill/unecessary. It looks nice and clean in current screenshots. May be keep cloud and beacon icon green because they are most important for user to watch on. I think mock up is right in that case.

@jamescowens
Copy link
Member

Looking pretty good...
image

@jamescowens
Copy link
Member

Let's get the BOINC logo in there and then I think this is ready.

@nathanielcwm
Copy link
Contributor

nathanielcwm commented Apr 16, 2021

Looking at the qt documentation I think the removal of resetButton->setMaximumWidth(150); may be causing the button corners to be rounded.

But it mentions that values of less than 50 cause buttons to become sharp though...

@jamescowens
Copy link
Member

The rounded buttons are consistent with the style guide in #847 that was approved by the community. I think they are fine as is.

This updates the light and dark stylesheets to match the proposed GUI
redesign's colors and widget appearance. It does not change structure
of the UI elements.
This adds sidebar and status bar icons from the proposed redesign of
the GUI.
This replaces icons in the researcher wizard with new designs from the
proposed GUI redesign.
This enables the GUI researcher model to respond to changes to the
application stylesheets to update icons and colors.
This changes the styles of the GUI side toolbar to match the proposed
redesign. It removes the top toolbar which contained the Gridcoin and
BOINC logos.
This updates the styles of the GUI status bar to match the proposed
redesign. It moves the status bar from the left to the bottom.
The proposed GUI redesign does not provide icons sufficient for a native
theme that can support both light and dark mode desktops. We can rebuild
a native theme in the future.
This causes the GUI to display a red, open padlock when the wallet is
fully-unlocked (not for staking only) to remind a user to lock it.
This changes the position of the main menu bar to stack above the
main content widget. It saves a bit of space and avoids the color
valley above the toolbar to balance the light theme appearance.
@cyrossignol
Copy link
Member Author

Sorry, forgot about it again. BOINC logo added. Default changed to dark mode.

image

image

@cyrossignol
Copy link
Member Author

Looking at the qt documentation I think the removal of resetButton->setMaximumWidth(150); may be causing the button corners to be rounded.

@nathanielcwm They're rounded because the stylesheets define them as rounded to match the mock ups.

@cyrossignol cyrossignol marked this pull request as ready for review April 17, 2021 16:22
@div72
Copy link
Member

div72 commented Apr 17, 2021

Looks really nice, so good job. Although I think this does raise the question of what to do with the top menu as I don't think the mockups have that (unless I'm misremembering).

@ghost
Copy link

ghost commented Apr 17, 2021

Looks really nice, so good job. Although I think this does raise the question of what to do with the top menu as I don't think the mockups have that (unless I'm misremembering).

Wasn't the mockups made looking like they ran on MacOS? Then the that menu will be in the menu bar top of the screen. That's not an option.

@cyrossignol
Copy link
Member Author

@div72 The mock ups don't provide any guidance since the designs are based on macOS with its separate menu bar. We could use a mobile-style fly-out menu on Windows/Linux (think Firefox/Chrome mega menu). Not quite there though...

@jamescowens
Copy link
Member

Let's leave the top menu as it is for now.

@jamescowens jamescowens self-requested a review April 17, 2021 23:51
Copy link
Member

@jamescowens jamescowens left a comment

Choose a reason for hiding this comment

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

This is good enough to merge at this point based on my testing. I want to get it onto testnet so more people can play with it.

@jamescowens jamescowens merged commit 2cd13cc into gridcoin-community:development Apr 17, 2021
jamescowens added a commit to jamescowens/Gridcoin-Research that referenced this pull request Aug 1, 2021
Added
 - util, rpc. gui: Changes for snapshotdownload and add feature sync from zero gridcoin-community#2093 (@iFoggz)
 - gui: Implement GUI version of consolidateunspent (coin control part) gridcoin-community#2111 (@jamescowens)
 - gui: Implement consolidateunspent wizard gridcoin-community#2125 (@jamescowens)
 - qt: Add antialiasing to traffic graph widget gridcoin-community#2150 (@barton2526)
 - util: Port of ArgsManager and a significant subset of src/util gridcoin-community#2146 (@jamescowens)
 - doc: add issue templates for bug reports and feature requests gridcoin-community#2147 (@Pythonix)
 - gui, rpc: Implement dynamic stakesplitting control, settings changes via rpc, and dynamic changes to sidestaking via rpc gridcoin-community#2164 (@jamescowens)
 - rpc: Implement getblocksbatch gridcoin-community#2205 (@jamescowens)
 - voting, rpc, gui: Implement demand loading of historical poll by poll id and AVW calculation gridcoin-community#2210 (@jamescowens)
 - gui: Show GUI error dialog if command line parsing fails gridcoin-community#2218 (@jamescowens)
 - gui: Implement close confirmation. gridcoin-community#2216 (@denravonska)
 - build: Use -fstack-reuse=none gridcoin-community#2232 (@barton2526)

Changed
 - doc: Update build doc gridcoin-community#2078 (@iFoggz)
 - gui: Normalize button and input control appearance gridcoin-community#2096 (@cyrossignol)
 - consensus: Implement GetMinimumRequiredConnectionsForStaking gridcoin-community#2097 (@jamescowens)
 - refactor: move CTransaction to primitives gridcoin-community#2006 (@div72)
 - consensus, refactor, test: Merkle gridcoin-community#2094 (@div72)
 - gui: Update diagnostics gridcoin-community#2095 (@jamescowens)
 - gui: Refresh UI styles and sidebar/statusbar design gridcoin-community#2102 (@cyrossignol)
 - gui: Set standard base Qt style on Windows and macOS gridcoin-community#2114 (@cyrossignol)
 - build, refactor: bump to C++17 gridcoin-community#2113 (@div72)
 - util, rpc, gui: Implement GetMaxInputsForConsolidationTxn() gridcoin-community#2119 (@jamescowens)
 - gui: Refresh overview page design gridcoin-community#2117 (@cyrossignol)
 - depends: change boost mirror gridcoin-community#2122 (@div72)
 - refactor: small cleanup gridcoin-community#2123 (@div72)
 - build: Update depends Qt recipe to version 5.12.10 gridcoin-community#2129 (@cyrossignol)
 - build: Bump Codespell to 2.0.0 gridcoin-community#2135 (@barton2526)
 - gui: Refresh "send coins" page design gridcoin-community#2126 (@cyrossignol)
 - gui: Optimize locks to improve responsiveness gridcoin-community#2137 (@cyrossignol)
 - gui: Refresh "receive payment" page design gridcoin-community#2138 (@cyrossignol)
 - gui: Add empty placeholder to recent transactions list gridcoin-community#2140 (@cyrossignol)
 - gui: Refresh transaction history page design gridcoin-community#2143 (@cyrossignol)
 - gui: Refresh address book page design gridcoin-community#2145 (@cyrossignol)
 - doc: Update http to https where possible gridcoin-community#2148 (@barton2526)
 - depends: Update dependencies gridcoin-community#2153 (@barton2526)
 - depends: Bump python to 3.6 gridcoin-community#2159 (@barton2526)
 - test: Update cppcheck linter to c++17 gridcoin-community#2157 (@barton2526)
 - test: Drop Travis specific workarounds, Mention commit id in error, Fix typos, Update spellcheck ignore words gridcoin-community#2158 (@barton2526)
 - gui: Overhaul the voting UI gridcoin-community#2151 (@cyrossignol)
 - wallet: simplify nTimeSmart calculation gridcoin-community#2144 (@div72)
 - gui: Refresh checkbox and radio button styles gridcoin-community#2170 (@cyrossignol)
 - build: Bump libevent to 2.1.11 gridcoin-community#2172 (@barton2526)
 - build: Update native_mac_alias, Remove big sur patch file in qt recipe gridcoin-community#2173 (@barton2526)
 - docs: Misc Grammar gridcoin-community#2176 (@barton2526)
 - build: miniupnpc 2.2.2 gridcoin-community#2179 (@barton2526)
 - rpc: Refresh rainbymagnitude gridcoin-community#2163 (@jamescowens)
 - util: optimize HexStr gridcoin-community#2185 (@div72)
 - refactor: misc style changes gridcoin-community#2177 (@div72)
 - rpc: consolidatemsunspent changes. gridcoin-community#2136 (@iFoggz)
 - refactor: Replace "GlobalStatus" state management gridcoin-community#2183 (@cyrossignol)
 - rpc, util: Remove use of ArgsManager::NETWORK_ONLY for now gridcoin-community#2190 (@jamescowens)
 - doc: Replace hidden service with onion service, Capitalize "Tor" gridcoin-community#2193 (@barton2526)
 - gui: Update Qt Linguist localization files gridcoin-community#2192 (@cyrossignol)
 - script: Shell script cleanups gridcoin-community#2195 (@barton2526)
 - build: set minimum required Boost to 1.58.0 gridcoin-community#2194 (@barton2526)
 - build, util: Prevent execution for Windows versions less than Windows 7 gridcoin-community#2203 (@jamescowens)
 - build: Tweak NSIS Windows installer gridcoin-community#2204 (@jamescowens)
 - build: Add bison in depends gridcoin-community#2206 (@iFoggz)
 - build: macOS toolchain bump gridcoin-community#2207 (@div72)
 - doc: Update build-unix.md gridcoin-community#2212 (@springfielddatarecovery)
 - build: Bump minimum python version to 3.6, Remove python2 references gridcoin-community#2219 (@barton2526)
 - depends: Change openSSL source path to Github gridcoin-community#2237 (@barton2526)
 - doc: Fix typo in bug report template gridcoin-community#2243 (@jamescowens)
 - ci: fold depends output gridcoin-community#2244 (@div72)

Removed
 - wallet: remove dead hardcoded addnodes gridcoin-community#2116 (@sweede-se)
 - rpc: Remove readconfig gridcoin-community#2248 (@jamescowens)
 - rpc: Remove obsolete comparesnapshotaccrual RPC function gridcoin-community#2100 (@jamescowens)
 - rpc: Remove memorypool RPC Command gridcoin-community#2214 (@RoboticMind)
 - rpc: Remove deprecated RPC commands gridcoin-community#2101 (@jamescowens)
 - Remove CCT from README, add Discord gridcoin-community#2134 (@barton2526)
 - refactor: Remove obsolete pubsub method definitions gridcoin-community#2191 (@barton2526)
 - refactor: Remove msMiningErrorsIncluded & msMiningErrorsExcluded gridcoin-community#2215 (@RoboticMind)
 - qt: Remove obsolete topLevelWidget(), Remove obsolete QRegExpValidator gridcoin-community#2198 (@barton2526)
 - net: Drop support of the insecure miniUPnPc versions gridcoin-community#2178 (@barton2526)
 - log: remove deprecated db log category gridcoin-community#2201 (@barton2526)
 - doc: Remove CCT from README and release process docs gridcoin-community#2175 (@barton2526)
 - build: Remove travis references gridcoin-community#2156 (@barton2526)

Fixed
 - gui: Fix macOS and designer font sizes gridcoin-community#2098 (@cyrossignol)
 - gui: Have the TrafficGraphWidget respect the selected stylesheet. gridcoin-community#2107 (@jamescowens)
 - gui: Fix macOS display inconsistencies gridcoin-community#2106 (@cyrossignol)
 - gui: Fix RPC console auto-complete background color gridcoin-community#2108 (@cyrossignol)
 - gui: Avoid reloading redundant stylesheets gridcoin-community#2109 (@cyrossignol)
 - gui: Fix "no active beacon" status gridcoin-community#2110 (@cyrossignol)
 - gui: Fix dark theme link text color visibility gridcoin-community#2115 (@cyrossignol)
 - scraper, util, qt: Fix several deprecations and warnings gridcoin-community#2131 (@jamescowens)
 - gui: Fix duplicate time in GUIUtil::dateTimeStr() gridcoin-community#2139 (@cyrossignol)
 - gui: Fix debug console traffic graph legend colors gridcoin-community#2142 (@cyrossignol)
 - gui: Fix nomenclature gridcoin-community#2104 (@jamescowens)
 - doc: Fix Typos gridcoin-community#2149 (@barton2526)
 - doc: Fix "master" branch build status badge in readme gridcoin-community#2167 (@cyrossignol)
 - gui: Fix Inter font rendering on Windows with FreeType gridcoin-community#2169 (@cyrossignol)
 - gui: Fix assert on non-existent data directory and GUI datadir chooser corner case issues gridcoin-community#2174 (@jamescowens)
 - gui: Fix display artifact in poll loading indicator gridcoin-community#2180 (@cyrossignol)
 - rpc, logging: Minor fixes for sidestake logging gridcoin-community#2187 (@jamescowens)
 - gui: Fix fractional scaling for dialog sizes gridcoin-community#2189 (@cyrossignol)
 - doc: Random fixes gridcoin-community#2197 (@barton2526)
 - doc: getbalance should say GRC not "btc" gridcoin-community#2199 (@barton2526)
 - net: Add missing verification of IPv6 address in CNetAddr::GetIn6Addr¦ gridcoin-community#2200 (@barton2526)
 - doc: remove duplicate line from .gitignore gridcoin-community#2202 (@Pythonix)
 - util: Tweak exception handling in MilliTimer class to eliminate compiler warnings gridcoin-community#2233 (@jamescowens)
 - depends: patch missing include in qt gridcoin-community#2234 (@div72)
 - wallet, rpc: Check each input for IsMine() in GetAddressGroupings gridcoin-community#2242 (@jamescowens)
 - util, qt: Fix snapshot download gridcoin-community#2246 (@jamescowens)
 - gui: Fix Column Widths in RPC Console. Elide long strings in their center. Indent user agent. gridcoin-community#2241 (@barton2526)
 - qt: Fix crash during download snapshot on macOS gridcoin-community#2250 (@jamescowens)
 - qt: Don't allow to open the debug window during splashscreen & verification state gridcoin-community#2245 (@barton2526)
 - gui: Fix address book selected model record when editing gridcoin-community#2253 (@cyrossignol)
 - researcher: Check wallet status before beacon renewal gridcoin-community#2254 (@cyrossignol)
 - qt: Prevent pasting (no label) as label in consolidation transaction gridcoin-community#2255 (@jamescowens)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improper coloring in file explorer when in Dark or Native mode.
10 participants