Created attachment 7724 missing 'Minutes' ? I have made some screenshots but they are in german...I hope the problem is still obvious. I think there should be 'Minutes' 'Hours' or also something like '1 hour 24 minutes' In my case i see only a '5' at a width sliding range.
Created attachment 7725 missing 'Hour' ?
Created attachment 7726 missing 'hour and ...' ?
Created attachment 7727 missing 'minutes' at Light-Locker settings
Created attachment 8000 underscore separated values I can confirm this issue. Not reported here, those values under the sliders are not centered, just when the cursor hovers them, they are shifted to the correct position. Some sliders are also a bit wider than the other near to it, only after changing their values the width becomes correct. I made a hacky modification so that values are underscore-separated, see the attached picture. So indeed, GtkSlider seems to be truncating strings on whitespace. The last gtk2 release (1.4.4), works correctly. So it seems to be a regression caused by the gtk3 port or in gtk3 itself, the minimal supported version is 3.14, maybe it's worth the shot checking how it behaves in 16.06 (gtk 3.18).
Created attachment 8003 sample.c I was able to test xfce4-power-manager from git master with Xubuntu 16.04, with its stock gtk 3.18.9 all looks good, but upgrading to 3.20.8 (via gnome3-team ppa) the glitch starts to manifest. Some change between those releases introduced a behavior that broke xfce4-power-manager. Last time I built gtk and installed system wide, it messed lots of things, so I'm not in the mood to bisect. Some day gtk devs could drop this format-value feature[1], so I think the proposed replacement makes sense (i.e. use labels). The attached (quick and dirt) sample demonstrates the current broken behavior and what would look like the replacement with plain labels. 1 - https://gitlab.gnome.org/GNOME/gtk/issues/113#note_83187
Similar issue: $ xfce4-power-manager-settings -V This is xfce4-power-manager version 1.6.1, running on Xfce 4.12. Built with GTK+ 3.22.26, linked with GTK+ 3.22.30. The values displayed for the slider "system-sleep-inactivity-on-battery" are as follows: Never, 15, 16, ..., 58, 59, One, One, ..., One, 2 hours, 2, ..., 2, 3 hours, 3, ..., 3, 4 hours, 4, ..., 4, 5 hours, 5, 5, ... I would expect the following values: Never, 15 minutes, 16 minutes, ..., 59 minutes, One hour, One hour one minute, One hour 2 minutes, ..., One hour 59 minutes, 2 hours, ...
Created attachment 8157 WIP Patch
*** Bug 15143 has been marked as a duplicate of this bug. ***
From my perspective the workaround approach is ok. The only remark I have is that I would - only apply the provider to the style context of the scale widgets and - set the label insensitive (gtk_widget_set_insensitive) to mimick the previous style
Created attachment 8395 0001-Fix-slider-labels-Bug-14395.patch (In reply to Simon Steinbeiss from comment #9) > - only apply the provider to the style context of the scale widgets Thunar uses gtk_style_context_add_provider_for_screen, so I don't think it's really that bad. > - set the label insensitive (gtk_widget_set_insensitive) to mimick the > previous style Done.
Andre Miranda referenced this bugreport in commit 67582a97fc57810cefd78c271aed4660dbd93dfe Fix slider labels (Bug #14395) https://git.xfce.org/xfce/xfce4-power-manager/commit?id=67582a97fc57810cefd78c271aed4660dbd93dfe
Looks good and gets the job done. Thanks for the patch!