jnsh / arc-theme

A flat theme with transparent elements (actively maintained fork)
GNU General Public License v3.0
901 stars 77 forks source link

Sliders clipped #59

Closed ahgee2 closed 4 years ago

ahgee2 commented 4 years ago

These are some sliders from a wxWidgets application (http://mi.eng.cam.ac.uk/~ahg/wxRegSurf/). Note the clipped circles and the text too close to the slider:

arc

The problem is specific to Arc, here are the same sliders with Adwaita:

adwaita

Ubuntu 20.04, gtk 3.24. Arc snapshot as of today (30 June 2020). Happy to help debug, but don't know where to start myself!

jnsh commented 4 years ago

Can't reproduce under Arch Linux (it's the same with any of the Arc theme variants): Screenshot from 2020-06-30 22-30-19

However, if I launch the application with Arc theme, and then switch to Adwaita, the sliders are similarly clipped (the issue doesn't appear if I launch the program with Adwaita): Screenshot from 2020-06-30 22-33-29

Therefore I don't think this is an issue with the theme.

Either way, since the program seems to br using wxGTK2 instead of wxGTK3 unless I'm mistaken, even if the problem resulted from the theme, I think there's very little chance of debugging or fixing the issue.

ahgee2 commented 4 years ago

Thanks for looking into this so quickly. Apologies, I should have made clear that I was testing a wxGTK3 version, you are right the current release is wxGTK2. I have put the gtk3 version at http://mi.eng.cam.ac.uk/~ahg/for_jnsh.zip if you would like to take a look, though I appreciate it's not likely to be high priority for you. Thanks so much for taking on the maintenance of this lovely theme.

jnsh commented 4 years ago

Thanks. I had a quick look at the GTK3 version with GTK inspector, but couldn't figure out a way to correct the issue, and didn't notice anything odd with the calculated CSS styling.

Again with the GTK3 version, if you launch the application with Arc theme, and then switch to Adwaita, the sliders remain clipped. If you start the app with Adwaita and swith to Arc, the sliders are clipped only 1px from horizontal edges.

The sliders also appear correct in Audacity settings, which also uses wxGTK3.

The above makes me think this may be some bug or oddity with wxGTK, or something to do with how the GUI is built for this specific program. I can't really think anything that could be done from the theme's side, although there's always a chance this will be accidentally fixed as a side effect of some future GTK3 theme fixes.

Another unrelated oddity is that if you switch the theme after launching the application, the sidebar background color doesn't change (this also happens with Audacity), which also hints that the wxGTK3 theming could have some issues..

EDIT. Closed by accident

jnsh commented 4 years ago

I looked at this again more thoroughly last night, and still I don't think this could be considered an issue with the theme, nor there's anything that could be done from the theme's side. For example, increasing the min-height CSS property for the sliders didn't have any effect on their size. Increasing the padding didn't change the widget size either.

I also noticed the following error while switching the the theme to Adwaita: (wxRegSurf_gtk3:114678): Gtk-CRITICAL **: 12:56:42.695: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkCheckButton. While this may not be directly related to the problem in hand, it seems to have something to with the widget size allocation. Searching for the error revealed some wxGTK related issues, but none of those seemed directly related to this.

If you want to attempt fixing this from the application, have you tried packing the sidebar widgets inside a GtkBox, or some similar container widget? That seems to be a common approach when designing GTK UIs, and should align the control widgets more evenly, even if it didn't help with this size allocation issue.

I'm closing this for now, since there's nothing I could do to fix this. Feel free to continue here regardless if there's anything I could do to help. Also I'd be interested to hear if you figure out a solution to the problem :)

ahgee2 commented 4 years ago

Thanks jnsh, as you say probably not an issue with the theme, so best to close this now. For what it's worth, I observe the same behaviour with many other themes, but not all. Presumably there's some common code shared by all the affected themes. The sliders are already packed inside wxBoxSizers, so probably not much joy to be had there. I will certainly let you know if I ever figure out a solution!