Ticket #4304: sugar-toolkit-gtk3.patch

File sugar-toolkit-gtk3.patch, 1.4 KB (added by humitos, 10 years ago)
  • src/sugar3/graphics/style.py

    From 6b8845749d43cd86e2f26a6fa32de4c073923218 Mon Sep 17 00:00:00 2001
    From: Manuel Kaufmann <humitos@gmail.com>
    Date: Thu, 13 Dec 2012 18:39:08 -0300
    Subject: [PATCH sugar-toolkit-gtk3] Gdk.RGBA helper and new color added
    
    This method is useful to modify the background color of a widget using
    'gtk_widget_override_background_color' function[1].
    
    A new color added to use on 'jarabe.journal.keepicon.KeepIcon' on
    ACTIVE state (SL #4304).
    
    [1] http://developer.gnome.org/gtk3/3.5/GtkWidget.html#gtk-widget-override-background-color
    
    Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
    ---
     src/sugar3/graphics/style.py | 5 +++++
     1 file changed, 5 insertions(+)
    
    diff --git a/src/sugar3/graphics/style.py b/src/sugar3/graphics/style.py
    index 2a5bfa8..48672a9 100644
    a b class Color(object): 
    7474        return Gdk.Color(int(self._r * 65535), int(self._g * 65535),
    7575                             int(self._b * 65535))
    7676
     77    def get_gdk_rgba_color(self):
     78        return Gdk.RGBA(self._r, self._g, self._b, self._a)
     79
    7780    def get_html(self):
    7881        return '#%02x%02x%02x' % (self._r * 255, self._g * 255, self._b * 255)
    7982
    COLOR_INACTIVE_STROKE = Color('#757575') 
    143146COLOR_TEXT_FIELD_GREY = Color('#E5E5E5')
    144147COLOR_HIGHLIGHT = Color('#E7E7E7')
    145148
     149COLOR_ZOOM_VIEWS_ACTIVE = Color('#B3B3B3')
     150
    146151PALETTE_CURSOR_DISTANCE = zoom(10)
    147152
    148153TOOLBAR_ARROW_SIZE = zoom(24)