KVIrc icon indicating copy to clipboard operation
KVIrc copied to clipboard

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

Open un1versal opened this issue 9 years ago • 6 comments

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

  • Menus do not appear
  • Scrollbars are invisible
  • Cant show icons on menus
  • Label background is fixed see https://github.com/kvirc/KVIrc/issues/2117#issuecomment-241208158
  • interferes with KVIrc internal theming (unreadable text white text on white background)

Also see https://github.com/kvirc/KVIrc/issues/2117#issuecomment-241208158 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.

un1versal avatar Aug 20 '16 11:08 un1versal

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 889e898ab02feb84e128130df7153ce123027515 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 :disappointed:

minj avatar Aug 20 '16 14:08 minj

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.

un1versal avatar Aug 20 '16 15:08 un1versal

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

channel view

settings view

servers view

I see nothing wrong here :+1:

minj avatar Aug 20 '16 15:08 minj

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.

un1versal avatar Aug 20 '16 16:08 un1versal

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.

ctrlaltca avatar Aug 21 '16 09:08 ctrlaltca

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 https://github.com/kvirc/KVIrc/issues/2118 is there anything else we should add?

un1versal avatar Aug 21 '16 11:08 un1versal