Summary: | Indicator line in GtkVolumeButton is not displayed in oxygen-gtk | ||
---|---|---|---|
Product: | [Plasma] Oxygen | Reporter: | Gökçen Eraslan <gokcen.eraslan> |
Component: | gtk2-engine | Assignee: | Hugo Pereira Da Costa <hugo.pereira.da.costa> |
Status: | CLOSED FIXED | ||
Severity: | normal | CC: | b7.10110111, hugo.pereira.da.costa, web |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Gökçen Eraslan
2011-01-03 09:05:52 UTC
Definitely a bug. To be consistent with Qt/Kde, the design should not have a blue line like in Clearlooks, but there should be a vertical grey sunken line, like for regular sliders. To help debug this: what is the name of the application that displays the incorrect widget ? Thanks, Hugo (In reply to comment #1) > Definitely a bug. > To be consistent with Qt/Kde, the design should not have a blue line like in > Clearlooks, but there should be a vertical grey sunken line, like for regular > sliders. > > To help debug this: what is the name of the application that displays the > incorrect widget ? I'm using gnome-mplayer[1]. > > Thanks, > > Hugo [1] http://code.google.com/p/gnome-mplayer/ commit 06bf6559d5f515323f8819b19d04ea932c2dc6aa branch 1.0 Author: Hugo Pereira Da Costa <hugo@oxygen-icons.org> Date: Mon Jan 3 11:41:28 2011 +0100 Use GtkOrientable interface to get slider orientation for GtkScale widgets. CCBUG: 261932 diff --git a/src/oxygenstylewrapper.cpp b/src/oxygenstylewrapper.cpp index c94241d..229cb4e 100644 --- a/src/oxygenstylewrapper.cpp +++ b/src/oxygenstylewrapper.cpp @@ -812,21 +812,26 @@ namespace Oxygen StyleOptions options = StyleOptions( widget, state, shadow ); Style::instance().renderMenuItemRect( window, clipRect, widget, x, y, w, h, options ); - } else if( d.isTroughAny() && GTK_IS_VSCALE( widget ) ) { + } else if( d.isTroughAny() && GTK_IS_SCALE( widget ) ) { - // TODO: calculate this value from the style "slider-width" property + const bool vertical( gtk_orientable_get_orientation( GTK_ORIENTABLE( widget ) ) == GTK_ORIENTATION_VERTICAL ); const int offset( 6 ); - if( d.isTrough() ) Style::instance().renderSliderGroove( window, clipRect, x, y + offset, w, h - 2*offset, Vertical ); - else if( d.isTroughLower() ) Style::instance().renderSliderGroove( window, clipRect, x, y + offset, w, h, Vertical ); - else if( d.isTroughUpper() ) Style::instance().renderSliderGroove( window, clipRect, x, y, w, h - offset, Vertical ); + if( vertical ) { - } else if( d.isTroughAny() && GTK_IS_HSCALE( widget ) ) { + // TODO: calculate this value from the style "slider-width" property + if( d.isTrough() ) Style::instance().renderSliderGroove( window, clipRect, x, y + offset, w, h - 2*offset, Vertical ); + else if( d.isTroughLower() ) Style::instance().renderSliderGroove( window, clipRect, x, y + offset, w, h, Vertical ); + else if( d.isTroughUpper() ) Style::instance().renderSliderGroove( window, clipRect, x, y, w, h - offset, Vertical ); - // TODO: calculate this value from the style "slider-width" property - const int offset( 6 ); - if( d.isTrough() ) Style::instance().renderSliderGroove( window, clipRect, x + offset, y, w - 2*offset, h, StyleOptions() ); - else if( d.isTroughLower() ) Style::instance().renderSliderGroove( window, clipRect, x + offset, y, w, h, StyleOptions() ); - else if( d.isTroughUpper() ) Style::instance().renderSliderGroove( window, clipRect, x, y, w - offset, h, StyleOptions() ); + } else { + + // TODO: calculate this value from the style "slider-width" property + const int offset( 6 ); + if( d.isTrough() ) Style::instance().renderSliderGroove( window, clipRect, x + offset, y, w - 2*offset, h, StyleOptions() ); + else if( d.isTroughLower() ) Style::instance().renderSliderGroove( window, clipRect, x + offset, y, w, h, StyleOptions() ); + else if( d.isTroughUpper() ) Style::instance().renderSliderGroove( window, clipRect, x, y, w - offset, h, StyleOptions() ); + + } } else if( d.isTrough() && shadow == GTK_SHADOW_IN ) { That should fix it (Damn: someone should really limit the size of the diff on bugzilla). Anyway, thanks for reporting. Closing the bug. I can reproduce this bug with 1.0.1, is the patch included? Well, it was, and somehow the bug reappeared (a regression). Both in 1.0 and master. Investigating. Sorry. ... must be an incorrect conflict resolution. The changes are simply gone from the current code. Bisecting. commit 88b21265822c7120eb5ae50012c78c42bb83d044 branch 1.0 Author: Hugo Pereira Da Costa <hugo@oxygen-icons.org> Date: Wed Jan 19 10:35:00 2011 +0100 Re-added 06bf6559d5f515323f8819b19d04ea932c2dc6aa (not sure how it got lost) Use GtkOrientable interface to get slider orientation for GtkScale widgets. CCBUG: 261932 diff --git a/src/oxygenstylewrapper.cpp b/src/oxygenstylewrapper.cpp index c21fc6f..8eb34c5 100644 --- a/src/oxygenstylewrapper.cpp +++ b/src/oxygenstylewrapper.cpp @@ -830,21 +830,26 @@ namespace Oxygen StyleOptions options = StyleOptions( widget, state, shadow ); Style::instance().renderMenuItemRect( window, clipRect, widget, x, y, w, h, options ); - } else if( d.isTroughAny() && GTK_IS_VSCALE( widget ) ) { + } else if( d.isTroughAny() && GTK_IS_SCALE( widget ) ) { - // TODO: calculate this value from the style "slider-width" property + const bool vertical( gtk_orientable_get_orientation( GTK_ORIENTABLE( widget ) ) == GTK_ORIENTATION_VERTICAL ); const int offset( 6 ); - if( d.isTrough() ) Style::instance().renderSliderGroove( window, clipRect, x, y + offset, w, h - 2*offset, Vertical ); - else if( d.isTroughLower() ) Style::instance().renderSliderGroove( window, clipRect, x, y + offset, w, h, Vertical ); - else if( d.isTroughUpper() ) Style::instance().renderSliderGroove( window, clipRect, x, y, w, h - offset, Vertical ); + if( vertical ) { - } else if( d.isTroughAny() && GTK_IS_HSCALE( widget ) ) { + // TODO: calculate this value from the style "slider-width" property + if( d.isTrough() ) Style::instance().renderSliderGroove( window, clipRect, x, y + offset, w, h - 2*offset, Vertical ); + else if( d.isTroughLower() ) Style::instance().renderSliderGroove( window, clipRect, x, y + offset, w, h, Vertical ); + else if( d.isTroughUpper() ) Style::instance().renderSliderGroove( window, clipRect, x, y, w, h - offset, Vertical ); - // TODO: calculate this value from the style "slider-width" property - const int offset( 6 ); - if( d.isTrough() ) Style::instance().renderSliderGroove( window, clipRect, x + offset, y, w - 2*offset, h, StyleOptions() ); - else if( d.isTroughLower() ) Style::instance().renderSliderGroove( window, clipRect, x + offset, y, w, h, StyleOptions() ); - else if( d.isTroughUpper() ) Style::instance().renderSliderGroove( window, clipRect, x, y, w - offset, h, StyleOptions() ); + } else { + + // TODO: calculate this value from the style "slider-width" property + const int offset( 6 ); + if( d.isTrough() ) Style::instance().renderSliderGroove( window, clipRect, x + offset, y, w - 2*offset, h, StyleOptions() ); + else if( d.isTroughLower() ) Style::instance().renderSliderGroove( window, clipRect, x + offset, y, w, h, StyleOptions() ); + else if( d.isTroughUpper() ) Style::instance().renderSliderGroove( window, clipRect, x, y, w - offset, h, StyleOptions() ); + + } } else if( d.isTrough() && shadow == GTK_SHADOW_IN ) { Thank you, I love fast upstreams :) |