diff --git a/ubiquity-frontend-gtk-le-light/package/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py b/ubiquity-frontend-gtk-le-light/package/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py index 470b164f75605e4f9ac0d39d35ac10fd91144987..1d67ca0552948a740b9581c3f663bec1da66a47d 100644 --- a/ubiquity-frontend-gtk-le-light/package/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py +++ b/ubiquity-frontend-gtk-le-light/package/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py @@ -253,6 +253,9 @@ class Wizard(BaseFrontend): provider.load_from_data( '''GtkProgressBar { -GtkProgressBar-min-horizontal-bar-height : 10 + } + GtkPaned { + -GtkPaned-handle-size: 10; }''') Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), diff --git a/ubiquity-frontend-gtk-le/package/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py b/ubiquity-frontend-gtk-le/package/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py index 470b164f75605e4f9ac0d39d35ac10fd91144987..1d67ca0552948a740b9581c3f663bec1da66a47d 100644 --- a/ubiquity-frontend-gtk-le/package/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py +++ b/ubiquity-frontend-gtk-le/package/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py @@ -253,6 +253,9 @@ class Wizard(BaseFrontend): provider.load_from_data( '''GtkProgressBar { -GtkProgressBar-min-horizontal-bar-height : 10 + } + GtkPaned { + -GtkPaned-handle-size: 10; }''') Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), diff --git a/ubiquity-le/package/usr/lib/ubiquity/plugins/ubi-partman.py b/ubiquity-le/package/usr/lib/ubiquity/plugins/ubi-partman.py index 7d3cd6c5d0cd15214a6e6d16bcd838c2cec25be6..92c0a11ed45c1967a35c973570bcbc062aeed55b 100644 --- a/ubiquity-le/package/usr/lib/ubiquity/plugins/ubi-partman.py +++ b/ubiquity-le/package/usr/lib/ubiquity/plugins/ubi-partman.py @@ -413,10 +413,8 @@ class PageGtk(PageBase): if 'windows' in title.lower(): PATH = os.environ.get('UBIQUITY_PATH', False) or '/usr/share/ubiquity' icon.logo.set_from_file(os.path.join(PATH, 'pixmaps', 'windows_square.png')) - elif 'buntu' in title.lower(): - icon.set_property('icon-name', 'distributor-logo') else: - icon.set_property('icon-name', 'block-device') + icon.set_property('icon-name', 'drive-harddisk') # TODO See if we can get the filesystem label first in misc.py, # caching lookups. diff --git a/ubiquity-le/package/usr/lib/ubiquity/ubiquity/gtkwidgets.py b/ubiquity-le/package/usr/lib/ubiquity/ubiquity/gtkwidgets.py index f14a12fcb2204c0976830624960a7f1d21604082..88298d2993f136e08538a207f794050d0737784e 100644 --- a/ubiquity-le/package/usr/lib/ubiquity/ubiquity/gtkwidgets.py +++ b/ubiquity-le/package/usr/lib/ubiquity/ubiquity/gtkwidgets.py @@ -115,16 +115,30 @@ class ResizeWidget(Gtk.HPaned): # The max size (b) that the existing partition can be resized to. self.max_size = max_size + # Use test window to figure out highlight color + test_window = Gtk.Window() + test_label = Gtk.Label() + test_window.add(test_label) + style = test_label.get_style_context() + self.highlight_color = style.get_background_color( + Gtk.StateFlags.SELECTED) + self.highlight_color.alpha = 0.5 + # more recent python-gi has .to_color() override, copy it... + self.highlight_color_rgb = Gdk.Color(65535, 65535, 65535) + # FIXME: Why do we still need these event boxes to get proper bounds # for the linear gradient? self.existing_part = existing_part or PartitionBox() eb = Gtk.EventBox() + eb.modify_bg(Gtk.StateFlags.NORMAL, self.highlight_color_rgb) eb.add(self.existing_part) self.pack1(eb, resize=False, shrink=False) self.new_part = new_part or PartitionBox() eb = Gtk.EventBox() + eb.modify_bg(Gtk.StateFlags.NORMAL, self.highlight_color_rgb) eb.add(self.new_part) self.pack2(eb, resize=False, shrink=False) + self.show_all() # FIXME hideous, but do_realize fails inexplicably. self.connect('realize', self.realize) @@ -191,7 +205,7 @@ class DiskBox(Gtk.Box): GObject.type_register(DiskBox) -class PartitionBox(StylizedFrame): +class PartitionBox(Gtk.Alignment):\ __gtype_name__ = 'PartitionBox' __gproperties__ = { 'title' : (GObject.TYPE_STRING, 'Title', None, 'Title', @@ -230,7 +244,7 @@ class PartitionBox(StylizedFrame): # 4 px between the title and the extra heading # 5 px between the extra heading and the size # 12 px below the bottom-most element - StylizedFrame.__init__(self) + Gtk.Alignment.__init__(self) vbox = Gtk.Box() vbox.set_orientation(Gtk.Orientation.VERTICAL) self.logo = Gtk.Image.new_from_icon_name(icon_name, @@ -271,33 +285,6 @@ class PartitionBox(StylizedFrame): size = misc.format_size(size) self.size.set_markup('<span size="x-large">%s</span>' % size) - def render_dots(self): - # FIXME: Dots are rendered over the frame. - s = cairo.ImageSurface(cairo.FORMAT_ARGB32, 2, 2) - cr = cairo.Context(s) - cr.set_source_rgb(*gtk_to_cairo_color('#b6b0a9')) - cr.rectangle(1, 1, 1, 1) - cr.fill() - pattern = cairo.SurfacePattern(s) - return pattern - - def paint_background(self, c): - StylizedFrame.paint_background(self, c) - a = self.get_allocation() - pattern = self.render_dots() - pattern.set_extend(cairo.EXTEND_REPEAT) - c.set_source(pattern) - c.fill_preserve() - - g = cairo.RadialGradient(a.width / 2, a.height / 2, 0, a.width / 2, - a.height / 2, - a.width > a.height and a.width or a.height) - g.add_color_stop_rgba(0.00, 1, 1, 1, 1.00) - g.add_color_stop_rgba(0.25, 1, 1, 1, 0.75) - g.add_color_stop_rgba(0.40, 1, 1, 1, 0.00) - c.set_source(g) - c.fill_preserve() - GObject.type_register(PartitionBox) class StateBox(StylizedFrame):