def __build_window(self): """Build up the widget""" # toplevel widget self.top_vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.add(self.top_vbox) # header line: icon, grid with name and "hide in wv" # FIXME self.hdr_align = Gtk.Alignment() self.top_vbox.pack_start(self.hdr_align, True, True, 0) self.hdr_align.set_padding(0, 25, 0, 0) self.hdr_box = Gtk.Box() self.hdr_align.add(self.hdr_box) self.hdr_box.set_spacing(10) # Button to tag icon selector self.ti_bt = Gtk.Button() self.ti_bt_label = Gtk.Label() self.ti_bt.add(self.ti_bt_label) self.hdr_box.pack_start(self.ti_bt, True, True, 0) self.ti_bt.set_size_request(64, 64) self.ti_bt.set_relief(Gtk.ReliefStyle.HALF) # vbox for tag name and hid in WV self.tp_grid = Gtk.Grid() self.hdr_box.pack_start(self.tp_grid, True, True, 0) self.tp_grid.set_column_spacing(5) self.tn_entry_lbl_align = Gtk.Alignment.new(0, 0.5, 0, 0) self.tp_grid.add(self.tn_entry_lbl_align) self.tn_entry_lbl = Gtk.Label() self.tn_entry_lbl.set_markup("<span weight='bold'>%s</span>" % _("Name : ")) self.tn_entry_lbl_align.add(self.tn_entry_lbl) self.tn_entry = Gtk.Entry() self.tn_entry.set_width_chars(20) self.tp_grid.attach(self.tn_entry, 1, 0, 1, 1) self.tn_cb_lbl_align = Gtk.Alignment.new(0, 0.5, 0, 0) self.tp_grid.attach(self.tn_cb_lbl_align, 0, 1, 1, 1) self.tn_cb_lbl = Gtk.Label(label=_('Show Tag in "Actionable" view:')) self.tn_cb_lbl_align.add(self.tn_cb_lbl) self.tn_cb = Gtk.CheckButton() self.tp_grid.attach(self.tn_cb, 1, 1, 1, 1) # Tag color self.tc_vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.top_vbox.pack_start(self.tc_vbox, True, True, 0) self.tc_label_align = Gtk.Alignment() self.tc_vbox.pack_start(self.tc_label_align, True, True, 0) self.tc_label_align.set_padding(0, 0, 0, 0) self.tc_label = Gtk.Label() self.tc_label_align.add(self.tc_label) self.tc_label.set_markup("<span weight='bold'>%s</span>" % _("Select Tag Color:")) self.tc_label.set_alignment(0, 0.5) # Tag color chooser self.tc_cc_align = Gtk.Alignment.new(0.5, 0.5, 0, 0) self.tc_vbox.pack_start(self.tc_cc_align, True, True, 0) self.tc_cc_align.set_padding(15, 15, 10, 10) self.tc_cc_colsel = SimpleColorSelector() # self.tc_cc_colsel = Gtk.ColorChooserWidget() self.tc_cc_align.add(self.tc_cc_colsel) # Icon selector self.tag_icon_selector = TagIconSelector()
def __build_window(self): """Build up the widget""" # toplevel widget self.top_vbox = gtk.VBox() self.add(self.top_vbox) # header line: icon, table with name and "hide in wv" self.hdr_align = gtk.Alignment() self.top_vbox.pack_start(self.hdr_align) self.hdr_align.set_padding(0, 25, 0, 0) self.hdr_hbox = gtk.HBox() self.hdr_align.add(self.hdr_hbox) self.hdr_hbox.set_spacing(10) # Button to tag icon selector self.ti_bt = gtk.Button() self.ti_bt_label = gtk.Label() self.ti_bt.add(self.ti_bt_label) self.hdr_hbox.pack_start(self.ti_bt) self.ti_bt.set_size_request(64, 64) self.ti_bt.set_relief(gtk.RELIEF_HALF) # vbox for tag name and hid in WV self.tp_table = gtk.Table(2, 2) self.hdr_hbox.pack_start(self.tp_table) self.tp_table.set_col_spacing(0, 5) self.tn_entry_lbl_align = gtk.Alignment(0, 0.5) self.tp_table.attach(self.tn_entry_lbl_align, 0, 1, 0, 1) self.tn_entry_lbl = gtk.Label() self.tn_entry_lbl.set_markup("<span weight='bold'>%s</span>" % _("Name : ")) self.tn_entry_lbl_align.add(self.tn_entry_lbl) self.tn_entry = gtk.Entry() self.tp_table.attach(self.tn_entry, 1, 2, 0, 1) self.tn_entry.set_width_chars(20) self.tn_cb_lbl_align = gtk.Alignment(0, 0.5) self.tp_table.attach(self.tn_cb_lbl_align, 0, 1, 1, 2) self.tn_cb_lbl = gtk.Label(_("Show Tag in Work View :")) self.tn_cb_lbl_align.add(self.tn_cb_lbl) self.tn_cb = gtk.CheckButton() self.tp_table.attach(self.tn_cb, 1, 2, 1, 2) # Tag color self.tc_vbox = gtk.VBox() self.top_vbox.pack_start(self.tc_vbox) self.tc_label_align = gtk.Alignment() self.tc_vbox.pack_start(self.tc_label_align) self.tc_label_align.set_padding(0, 0, 0, 0) self.tc_label = gtk.Label() self.tc_label_align.add(self.tc_label) self.tc_label.set_markup("<span weight='bold'>%s</span>" % _("Select Tag Color:")) self.tc_label.set_alignment(0, 0.5) # Tag color chooser self.tc_cc_align = gtk.Alignment(0.5, 0.5, 0, 0) self.tc_vbox.pack_start(self.tc_cc_align) self.tc_cc_align.set_padding(15, 15, 10, 10) self.tc_cc_colsel = SimpleColorSelector() self.tc_cc_align.add(self.tc_cc_colsel) # Icon selector self.tag_icon_selector = TagIconSelector()