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

GTKSTYLE: Not as broke as advertised - Conditions may apply - Update INSTALL doc. #2117

Closed
7 tasks
un1versal opened this issue Aug 20, 2016 · 6 comments
Closed
7 tasks

Comments

@un1versal
Copy link
Contributor

un1versal commented Aug 20, 2016

Note: This issue is a discussion now linked to from INSTALL doc general future reference and to have a place to discuss it and track issues.

Intro

When looking at -DWANT_GTKSTYLE= text in our INSTALL doc thers all this doom and gloom blaming it on GTK insanity.

Following this comment by @minj I just had to test it at this time.

INSTALL DOC claims

Also see #2117 (comment) for clarification on the original documented issues.

Observations after testing

  • Menus appear and render just fine (2 exceptions)
  • Scrollbars are visible
  • Icons can and are shown in menus
  • Label background (seems fine idk what fixed or INSTALL doc meant with the style tested.)
  • Theres no unreadable text on my tests (exception for interference with theme is selection bars and some tooltips hardcoded colors.)
  • Some dark Icons arent quite visible (exception but needs improving)

Also issue #1896 IS SOLVED by this, which probably means its Qt issue.

Exceptions of which some should be fixed.

  • 1. Server connect button is unstyled
  • 2. Groupbox boundaries on settings menus aren't visible,
  • 3. Menu separators and other similar type separators aren't visible.
  • 4. Overrides KVIrc theme selected color (exception which seems fine anyway)
  • 5. Some Tooltips look weird and some text hard to read (because we customize them) this is expected then but looks bad, some unreadable text depending on style.
  • 6. DCC transfer progress indicator is unstyled. (probably customized also).
  • 7. Some dark program Icons arent quite visible in a dark setting/

Things could be better but hardly critical or not a reason to disable GTKSTYLE however

I suspect this is heavily dependent on desktop used, perhaps even distro or version and themes used how well GTK style is implemented there.

Test Environment / Install

This was a minimal Ubuntu iso (64-bit) of xenial 16.04LTS with Gnome Desktop only and Cinnamon 3.0.7 added ontop, with Mint-Y-Dark themes downloaded as is from GitHub.

heres a loose look.

demo-ab

demo-ab


From #2118 the INSTALL doc was revised and points to this discussion for future usage.

@minj
Copy link

minj commented Aug 20, 2016

What I meant by 'completely' broken in #2113 is that settings windows etc contain black text on black background in the latter build (using a dark GTK theme)

Bisecting lead me to 889e898 as the first bad commit.

-DWANT_GTKSTYLE=1 does help as suggested though.

Personally I don't care much about toolkits. I use whatever app I find best, be it GTK2, GTK3 or QT. Still I'd like them to have a common dark theme.

My actual system is lxde/GTK{2,3}. It's an old manjaro install and I somehow coped with all those theming changes until now just using lxappearance. Granted the various hacks to have a single theme multiplied over time.

I'm now using Vertex-Maia-Dark (dark-only) theme. It (more or less) supports all toolkits (GTK3 needs an explicit gtk-application-prefer-dark-theme=1 and QT4 needs style=GTK+). However, there's been a new mess with QT/GTK style integration with the new toolkit versions on arch/manjaro as they now need something called qt5ct: see instructions at the bottom at this post.

My current env is this:

XDG_CURRENT_DESKTOP=LXDE
QT_PLATFORM_PLUGIN=lxqt
QT_STYLE_OVERRIDE=gtk2
QT_QPA_PLATFORMTHEME=qt5ct

This shouldn't be so hard 😞

@un1versal
Copy link
Contributor Author

un1versal commented Aug 20, 2016

Some screenshots would help from you.

Theres no more Qt4 its just not supported anymore, gone and will never come back., your bisect only confirms this.

Based on my experience with my setup I think this is a limitation of Desktop + Theme support that makes this more broken for some people and not for others, I guess I was lucky.

In any case it is mostly external to KVIrc, my setup works 99% with a dark theme using GTKSTYLE=1

According to all you are saying it just confirms my suspicion, the issue is not GTK itself, but rather how bad the themes support it and dark themes imo are notoriously flawed in my experiences elsewhere.

Theres another way to darken KVIrc, we can load external Qt stylesheets (kvirc -style=qtcssfile), but they are not designed for KVIrc and require a log of work (you can find a few Qt stylesheets here on GitHub)
If someone fixed or made a KVIrc compatible Qt.css stylesheet that worked fully that would be imo ideal.

@minj
Copy link

minj commented Aug 20, 2016

Like I said adding -DWANT_GTKSTYLE=1 fixes 889e898 and later. Thanks for the suggestion.

channel view

settings view

servers view

I see nothing wrong here 👍

@un1versal
Copy link
Contributor Author

yea... looks good and it will except for the parts where we customize things like tooltips and other areas...
dcc transfer window for instance... just noticed it its unstyled some parts.

Will have to update the INSTALL doc file.

clearly dark themes have had more work in recent years, on mine for instance previous generation they sucked hard even OS side... and still far from 100% but better than nothing.

Ide still prefer to darken KVIrc via external css file so as to make its 100% consistent.

@ctrlaltca
Copy link
Contributor

Qt bundles a few "styles" (http://doc.qt.io/qt-5/gallery.html) that specify how widgets are painted on the screen. Qt automatically tries to use the style that most fits the os/desktop manager that is running inside.

A Gtk style exists, and it tries to render widgets in a way they feel coherent with the current theme used in a Gtk-based desktop manager (eg: gnome).

During the development of Qt4, a few hardcoded values started appearing in the theme, eg. you could change the background color of a text input field, but not the text color that was fixed as black. This caused problems for KVIrc when loading a dark theme, because you could easily end up with black text on a black background, making parts of the client unusable.

I suppose that during the development of Qt a lot of these bugs have been fixed, so it's totally possible that KVIrc is now playing fine with the Gtk style and this workaround is not needed anymore.

@un1versal
Copy link
Contributor Author

Thanks for that detailed explanation sure clarifies some things.

We customise a few things that GTK wont style in part, tooltips for instance, the transfer progress indicators, some headers and this is just the few I can find at this time.

Theres other things like some text colors and a 3 icons that also are not as visible as they possibly can.

So for those reasons I think its wise to make this optional at least until those things are addressed.

For that end what do you think of the updated text on INSTALL at #2118
is there anything else we should add?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants