Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-28660

QSpinBox is not drawn correctly with GTK-Styles Xfce*

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 4.8.4, 5.0.0
    • Widgets: Style Sheets
    • None
    • Ubuntu 12.10, Awesome WM

    Description

      This is a spin off of QTBUG-28557.

      How to reproduce

      1. Make sure your Qt is configured with GTK Support (on Ubuntu, you need to install the package 'libgtk2.0-dev').
      2. Use a Xfce* GTK theme, e.g. "Xfce 4.6". You can change your current theme with the application 'gtk-chtheme' (package has the same name on Ubuntu).
      3. Create a hello world gui app with a spin button.
      4. Run the app with "-style gtk".

      Observations (see attached screenshot)

      1. The right border of the line edit is not drawn.
      2. Behind the arrows is a white area drawn, which probably overpaints the right border of the line edit.
      3. If the window gets focus, next to the arrows is a vertical border drawn.

      Additional remarks
      The engine used for this theme seems to be 'xfce', as stated in the rc file of the theme (search for 'engine').

      /usr/share/themes/Xfce-4.6/gtk-2.0/gtkrc:

      # Created July 2006
      # Modified Dec. 2006
      # Modified Jan. 2007
      # Modified Jul. 2008 for xfce 4.6
      # Modified Feb. 2009 for xfce 4.6
      # Olivier Fourdan <fourdan@xfce.org>
      # Released under the GPL license
      
      style "default"
      {
          GtkWidget::focus-line-width                  = 1
          GtkWidget::focus_padding                     = 0
          GtkWidget::interior_focus                    = 0
          GtkWidget::internal_padding                  = 0
      
          GtkButton::child_displacement_x              = 0
          GtkButton::child_displacement_y              = 1
          GtkButton::default_border                    = {0, 0, 0, 0}
          GtkButton::default_outside_border            = {0, 0, 0, 0}
          GtkButton::focus-line-pattern                = "\0"
      
          GtkButtonBox::child_internal_pad_x           = 0
          GtkButtonBox::child_internal_pad_y           = 0
          GtkButtonBox::child_min_heigth               = 0
          GtkButtonBox::child_min_width                = 0
      
          GtkCheckButton::indicator_size               = 12
          GtkCheckButton::focus-line-pattern           = "\1\1"
      
          GtkEntry::focus-line-pattern                 = "\0"
      
          GtkRadioButton::indicator_size               = 12
          GtkRadioButton::focus-line-pattern           = "\1\1"
      
          GtkExpander::expander-size                   = 11
          GtkExpander::expander_spacing                = 0
      
          GtkMenuBar::internal-padding                 = 0
      
          GtkMenu::horizontal-padding                  = 0
          GtkMenu::vertical-padding                    = 0
      
          GtkMenuItem::internal_padding                = 2
          GtkMenuItem::selected_shadow_type            = etched-in
      
          GtkOptionMenu::indicator_size                = {0, 0}
          GtkOptionMenu::indicator_spacing             = {0, 0, 0, 0}
      
          GtkPaned::handle_full_size                   = 1
          GtkPaned::handle_size                        = 3
      
          GtkRange::slider_width                       = 15
          GtkRange::stepper_size                       = 15
          GtkRange::stepper_spacing                    = 0
          GtkRange::stepper_spacing                    = 0
          GtkRange::trough_border                      = 0
          GtkRange::trough-border                      = 0
      
          GtkScale::trough-side-details                = 1
          GtkScale::value_spacing                      = 0
      
          GtkScrollbar::has_backward_stepper           = 1
          GtkScrollbar::min_slider_length              = 20
      
          GtkScrolledWindow::scrollbar_spacing         = 0
      
          GtkTextView::focus-line-pattern              = "\0"
      
          GtkToolbar::internal-padding                 = 0
          GtkToolbar::space-size                       = 10
          GtkTreeView::expander-size                   = 11
      
          GtkTreeView::horizontal-separator            = 0
          GtkTreeView::vertical-separator              = 0
      
          ExoIconBar::focus_padding                    = 1
      
          xthickness = 2
          ythickness = 2
      
          base[ACTIVE]      = "#d9d7d6"
          base[INSENSITIVE] = "#eeeeec"
          base[NORMAL]      = "#ffffff"
          base[PRELIGHT]    = "#eeeeec"
          base[SELECTED]    = "#bad8ff"
      
          bg[ACTIVE]        = "#d9d7d6"
          bg[INSENSITIVE]   = "#eeeeec"
          bg[NORMAL]        = "#eeeeec"
          bg[PRELIGHT]      = "#eeeeec"
          bg[SELECTED]      = "#d9d7d6"
      
          fg[ACTIVE]        = "#000000"
          fg[INSENSITIVE]   = "#888a85"
          fg[NORMAL]        = "#101010"
          fg[PRELIGHT]      = "#101010"
          fg[SELECTED]      = "#000000"
      
          text[ACTIVE]      = "#101010"
          text[INSENSITIVE] = "#101010"
          text[NORMAL]      = "#101010"
          text[PRELIGHT]    = "#101010"
          text[SELECTED]    = "#101010"
      
          engine "xfce"
          {
              smooth_edge = true
              boxfill
              {
                  fill_style = plain
              }
          }
      }
      
      style "gradient" = "default"
      {
          engine "xfce"
          {
              smooth_edge = true
              grip_style = none
              boxfill
              {
                  fill_style = gradient
                  orientation = vertical
                  shade_start = 1.10
                  shade_end = 0.90
              }
          }
      }
      
      style "menu" = "gradient"
      {
          bg[PRELIGHT]      = "#cce2ff"
          bg[INSENSITIVE]   = "#fafaf7"
          bg[NORMAL]        = "#fafaf7"
          fg[ACTIVE]        = "#101010"
          fg[PRELIGHT]      = "#101010"
          fg[SELECTED]      = "#101010"
          text[PRELIGHT]    = "#101010"
      
          engine "xfce"
          {
              smooth_edge = true
              boxfill
              {
                  fill_style = plain
                  orientation = vertical
                  shade_start = 1.10
                  shade_end = 0.90
              }
          }
      }
      
      style "menuitem" = "menu"
      {
          xthickness = 1
          ythickness = 2
      
          engine "xfce"
          {
              smooth_edge = true
              boxfill
              {
                  fill_style = plain
                  orientation = vertical
                  shade_start = 0.90
                  shade_end = 1.10
              }
          }
      }
      
      style "menubar" = "menu"
      {
          xthickness = 1
          ythickness = 2
      
          bg[INSENSITIVE]   = "#eeeeec"
          bg[NORMAL]        = "#eeeeec"
      
          engine "xfce"
          {
              smooth_edge = true
              boxfill
              {
                  fill_style = gradient
                  orientation = vertical
                  shade_start = 1.00
                  shade_end = 0.90
              }
          }
      }
      
      style "pager" = "gradient"
      {
          xthickness = 0
          ythickness = 0
      
          bg[SELECTED]      = "#5e98e3"
          fg[SELECTED]      = "#ffffff"
      
          engine "xfce"
          {
              smooth_edge = true
          }
      }
      
      style "button" = "default"
      {
          bg[ACTIVE]        = "#d9d7d6"
          bg[NORMAL]        = "#eeeeec"
          bg[PRELIGHT]      = "#cce2ff"
          bg[SELECTED]      = "#4e627d"
      
          fg[ACTIVE]        = "#000000"
          fg[SELECTED]      = "#ffffff"
      
          engine "xfce"
          {
              smooth_edge = true
              grip_style = none
              boxfill
              {
                  fill_style = gradient
                  orientation = vertical
                  shade_start = 1.10
                  shade_end = 0.90
              }
          }
      }
      
      style "notebook" = "default"
      {
          xthickness = 1
          ythickness = 1
      
          bg[ACTIVE]        = "#e8e8e6"
          bg[NORMAL]        = "#ffffff"
          fg[NORMAL]        = "#101010"
      }
      
      style "scrollbar" = "default"
      {
          bg[ACTIVE]        = "#e8e8e6"
          bg[NORMAL]        = "#d9d7d6"
          bg[PRELIGHT]      = "#cce2ff"
      
          engine "xfce"
          {
              smooth_edge = true
              grip_style = handle
              boxfill
              {
                  fill_style = gradient
                  orientation = automatic
                  shade_start = 1.10
                  shade_end = 0.90
              }
          }
      }
      
      style "scale" = "scrollbar"
      {
          engine "xfce"
          {
              smooth_edge = true
              grip_style = none
              boxfill
              {
                  fill_style = gradient
                  orientation = automatic
                  shade_start = 1.10
                  shade_end = 0.90
              }
          }
      }
      
      style "progress" = "gradient"
      {
          xthickness = 0
          ythickness = 0
      
          bg[ACTIVE]        = "#d9d7d6"
          bg[NORMAL]        = "#e8e8e6"
          bg[PRELIGHT]      = "#cce2ff"
      
          fg[PRELIGHT]      = "#4e9a06"
      
          engine "xfce"
          {
              smooth_edge = true
              grip_style = none
              boxfill
              {
                  fill_style = gradient
                  orientation = automatic
                  shade_start = 1.10
                  shade_end = 0.90
              }
          }
      }
      
      style "handlebox" = "default"
      {
          engine "xfce"
          {
              smooth_edge = true
              grip_style = none
              boxfill
              {
                  fill_style = plain
              }
          }
      }
      
      style "tooltips" = "default"
      {
          bg[NORMAL] = "#ffffdf"
          fg[NORMAL] = "#101010"
      }
      
      style "rox" = "default"
      {
          bg[ACTIVE] = "#ffffff"
          bg[NORMAL] = "#ffffff"
      }
      
      style "titlebar" = "default"
      {
          bg[SELECTED]      = "#5e98e3"
          fg[SELECTED]      = "#ffffff"
          bg[INSENSITIVE]   = "#eeeeec"
          fg[INSENSITIVE]   = "#888a85"
      }
      
      
      widget_class "*"                   style "default"
      
      widget_class "*GtkTree*"           style "gradient"
      class "*GtkTree*"                  style "gradient"
      widget_class "*GtkCTree*"          style "gradient"
      class "*GtkCTree*"                 style "gradient"
      widget_class "*GtkList*"           style "gradient"
      class "*GtkList*"                  style "gradient"
      widget_class "*GtkCList*"          style "gradient"
      class "*GtkCList*"                 style "gradient"
      widget_class "*Entry*"             style "gradient"
      class "*Entry*"                    style "gradient"
      widget_class "*Text*"              style "gradient"
      class "*Text*"                     style "gradient"
      widget_class "*Pager*"             style "pager"
      class "*Pager*"                    style "pager"
      
      widget_class "*Menu*"              style "menu"
      #class "*Menu*"                     style "menu"
      
      widget_class "*MenuItem*"          style "menuitem"
      class "*MenuItem*"                 style "menuitem"
      
      widget_class "*BonoboDockItem"     style "menubar"
      class "*BonoboDockItem"            style "menubar"
      widget_class "*ToolBar"            style "menubar"
      class "*ToolBar"                   style "menubar"
      widget_class "*MenuBar*"           style "menubar"
      class "*MenuBar*"                  style "menubar"
      
      widget_class "*HandleBox*"         style "handlebox"
      
      widget_class "*Button*"            style "button"
      class "*Button*"                   style "button"
      widget_class "*button*"            style "button"
      class "*button*"                   style "button"
      widget_class "*OptionMenu*"        style "button"
      class "*OptionMenu*"               style "button"
      
      widget_class "*.GtkNotebook"       style "notebook"
      class "*.GtkNotebook"              style "notebook"
      
      widget_class "*GtkVScrollbar*"     style "scrollbar"
      class "*GtkVScrollbar*"            style "scrollbar"
      widget_class "*GtkHScrollbar*"     style "scrollbar"
      class "*GtkHScrollbar*"            style "scrollbar"
      
      widget_class "*GtkHScale*"         style "scale"
      class "*GtkHScale*"                style "scale"
      widget_class "*GtkVScale*"         style "scale"
      class "*GtkVScale*"                style "scale"
      
      widget_class "*GtkProgress*"       style "progress"
      class "*GtkProgress*"              style "progress"
      
      widget "gtk-tooltip*"              style "tooltips"
      
      widget_class "*.Collection"        style "rox"
      
      widget "xfwm"                      style "titlebar"
      widget "xfwm4-tabwin*"             style "titlebar"
      class "MetaFrames"                 style "titlebar"
      widget_class "MetaFrames"          style "titlebar"
      

      Attachments

        1. qspinbox_gtkstyle_theme-xfce-4.6.png
          1 kB
          Nikolai Kosjar
        2. spinbox.png
          5 kB
          J-P Nurmi

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Unassigned Unassigned
              kosjar Nikolai Kosjar
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes