Closed nazar-pc closed 7 years ago
Application name? (in order to test)
Just try to change sound volume in gnome-shell (I believe, this is provided by gnome-settings-daemon
).
Source code: https://github.com/numixproject/numix-gtk-theme/blob/master/src/gtk-3.20/scss/widgets/_osd.scss#L61 and https://github.com/numixproject/numix-gtk-theme/blob/master/src/gtk-3.20/scss/widgets/_osd.scss#L63
Here such: (archlinux + gnome-shell 3.22)
Please fix it if you can.
If you cannot change the style with code (i linked the it's place in the previous post), you should test whether gnome-shells own themeing is the problem.
Looks ok to me. May be we should use osd_bg with relative lightness.
I was trying literally everything in that file for both 3.20 and 3.0, but was only able to change background here: https://github.com/numixproject/numix-gtk-theme/blob/master/src/gtk-3.20/scss/widgets/_osd.scss#L47
In my case OSD is shown by gnome-fallback-media-keys-helper. This is a component decoupled from earlier versions of GNOME3 stack before it become monolithic. It has version 3.6.4 and on Ubuntu can be installed from here: https://launchpad.net/~zorin-os/+archive/ubuntu/packages?field.series_filter=saucy
Gif looks nice, but I have no idea how to style it that way in my case.
Here is I think relevant source code from the package I've mentioned:
static void
draw_volume_boxes (GsdOsdDrawContext *ctx,
cairo_t *cr,
double percentage,
double _x0,
double _y0,
double width,
double height)
{
gdouble x1;
GdkRGBA acolor;
height = round (height) - 1;
width = round (width) - 1;
x1 = round ((width - 1) * percentage);
/* bar background */
gtk_style_context_save (ctx->style);
gtk_style_context_add_class (ctx->style, GTK_STYLE_CLASS_TROUGH);
gtk_style_context_get_background_color (ctx->style, GTK_STATE_NORMAL, &acolor);
gsd_osd_window_draw_rounded_rectangle (cr, 1.0, _x0, _y0, height / 6, width, height);
gdk_cairo_set_source_rgba (cr, &acolor);
cairo_fill (cr);
gtk_style_context_restore (ctx->style);
/* bar progress */
if (percentage < 0.01)
return;
gtk_style_context_save (ctx->style);
gtk_style_context_add_class (ctx->style, GTK_STYLE_CLASS_PROGRESSBAR);
gtk_style_context_get_background_color (ctx->style, GTK_STATE_NORMAL, &acolor);
gsd_osd_window_draw_rounded_rectangle (cr, 1.0, _x0, _y0, height / 6, x1, height);
gdk_cairo_set_source_rgba (cr, &acolor);
cairo_fill (cr);
gtk_style_context_restore (ctx->style);
}
Found a solution in #627, but looks like I've discovered more potential issues that were not reported yet.
but looks like I've discovered more potential issues that were not reported yet.
Like what? If it is not related to this issue, please open a new issue. Beside our osd code is very uncleaned and needs lot of work.
I'm not sure what and I'm not sure there are any, just looks suspicious that in 3.0 there was many .osd.whatever
, while in 3.20 it is .osd whatever
(which caused this issue and which I fixed in related PR by replacing .osd trough
with .osd.trough
and another similar tweak).
Will definitely post another issue when find something exact, just wanted to let you know.
OSD code is not completely repaired. There may be such errors.
It is acceptable on light background:![2016-10-31 14-14-11](https://cloud.githubusercontent.com/assets/928965/19853888/ac871768-9f74-11e6-9904-c266777b7f3e.png)
But often close to impossible to see current level on dark gray/black background:![2016-10-31 14-13-57](https://cloud.githubusercontent.com/assets/928965/19853903/c1a94472-9f74-11e6-8f50-8c4ff9a4bd21.png)
GTK 3.20 and GTK 3.22 at least