this.set_border_width(6);
this.set_resizable(false);
- this.modify_bg(StateType.NORMAL, white);
+ set_bg_color(this);
this.show_all();
}
var services_table = new Table(card.services.size, 1, false);
services_table.set_row_spacings(1);
services_table.set_col_spacings(0);
- services_table.modify_bg(StateType.NORMAL, white);
+ set_bg_color(services_table);
var table_button_hbox = new HBox(false, 6);
table_button_hbox.pack_start(services_vscroll, true, true, 4);
// A table doesn't have a background color, so put it in an EventBox, and
// set the EventBox's background color instead.
EventBox table_bg = new EventBox();
- table_bg.modify_bg(StateType.NORMAL, white);
+ set_bg_color(table_bg);
table_bg.add(services_table);
services_vbox_alignment.add(table_bg);
about.set_modal(true);
about.set_transient_for(this);
about.response.connect((a, b) => {about.destroy();});
- about.modify_bg(StateType.NORMAL, white);
+ set_bg_color(about);
about.run();
}
private void build_ui()
{
- // Note: On Debian7/Gtk+2, the menu bar remains gray. This doesn't happen on Debian8/Gtk+3.
- this.modify_bg(StateType.NORMAL, white);
+ set_bg_color(this);
create_ui_manager();
// quit_item.hide();
Gtk.MenuShell menushell = this.ui_manager.get_widget("/MenuBar") as Gtk.MenuShell;
- menushell.modify_bg(StateType.NORMAL, white);
osxApp.set_menu_bar(menushell);
osxApp.set_use_quartz_accelerators(true);
#else
var menubar = this.ui_manager.get_widget("/MenuBar");
main_vbox.pack_start(menubar, false, false, 0);
- menubar.modify_bg(StateType.NORMAL, white);
+ set_bg_color(menubar);
#endif
main_vbox.pack_start(top_table, true, true, 6);
{
this.set_title(_("Moonshot - Password"));
this.set_modal(true);
- this.modify_bg(StateType.NORMAL, white);
+ set_bg_color(this);
this.add_buttons(_("Cancel"), ResponseType.CANCEL,
_("Connect"), ResponseType.OK);
var content_area = this.get_content_area();
((Box) content_area).set_spacing(12);
- content_area.modify_bg(StateType.NORMAL, white);
+ set_bg_color(content_area);
Label dialog_label = new Label(_("Enter the password for " + id_card.display_name));
dialog_label.set_alignment(0, 0);
this.set_title(_("Trust Anchor"));
this.set_modal(true);
// this.set_transient_for(parent);
- this.modify_bg(StateType.NORMAL, white);
+ set_bg_color(this);
this.add_buttons(_("Cancel"), ResponseType.CANCEL,
_("Confirm"), ResponseType.OK);
var content_area = this.get_content_area();
((Box) content_area).set_spacing(12);
- content_area.modify_bg(StateType.NORMAL, white);
+ set_bg_color(content_area);
Label dialog_label = new Label("");
dialog_label.set_alignment(0, 0);
}
return result;
}
+
+static Gdk.Color white;
+static void set_bg_color(Widget w)
+{
+#if OS_WIN32
+
+ if (white == null) {
+ white = make_color(65535, 65535, 65535);
+ }
+
+ w.modify_bg(StateType.NORMAL, white);
+
+#endif
+}
// dialog.set_modal(true);
dialog.set_title(_("Warning"));
- dialog.modify_bg(StateType.NORMAL, white);
+ set_bg_color(dialog);
// ((Box) content_area).set_spacing(12);
- content_area.modify_bg(StateType.NORMAL, white);
+ set_bg_color(content_area);
content_area.show_all();