def __init__(self, master, owner, app, dlg): self.owner = owner PrefsTab.__init__(self, master, app, dlg) self.set_border_width(0) self.use_cms = config.cms_use hbox = wal.HBox(self) txt = _('Activate Color Management') self.cms_check = wal.CheckButton(hbox, txt, self.use_cms, self.changes) hbox.pack(self.cms_check, padding=10) self.pack(hbox, padding=5) self.container = wal.HidableVBox(hbox) self.splash = wal.ImgPlate(self.container, rc.IMG_PREFS_CMS_BANNER, bg=wal.DARK_GRAY) self.container.pack(self.splash, True, True) self.container.set_visible(self.use_cms) self.pack(self.container) hbox = wal.HBox(self) txt = _( 'Note: If Color Management is not activated all colors ' 'will be processed using simple calculation procedures. Therefore ' 'resulted color values will be not accurate.') note = wal.DecorLabel(hbox, txt, -1, enabled=False, wrap=True) note.set_width(450) hbox.pack(note, padding=10) self.pack(hbox, padding=5)
def __init__(self): wal.MainWindow.__init__(self) self.set_size(300, 200) self.pack(wal.HLine(self), padding=30) hbox = wal.HBox(self) hbox.pack(wal.VLine(self), True, True) self.pack(hbox, True, True)
def __init__(self): wal.MainWindow.__init__(self) self.set_size(300, 200) self.hbox = wal.HidableHBox(self) self.pack(self.hbox) size = (50, 50) self.hbox.pack(wal.ColorPlate(self.hbox, size, bg=wal.BLACK), True, True) self.hbox.set_visible(True) hbox = wal.HBox(self) self.pack(hbox, True, True) self.vbox = wal.HidableVBox(hbox) self.vbox.pack(wal.ColorPlate(self.hbox, size, bg=wal.GRAY), True, True) self.vbox.set_visible(True) hbox.pack(self.vbox) vbox = wal.VBox(hbox) hbox.pack(vbox, end=True) vbox.pack(wal.Button(vbox, 'Test HBox', cmd=self.test_hbox)) vbox.pack(wal.Button(vbox, 'Test VBox', cmd=self.test_vbox))
def __init__(self): wal.MainWindow.__init__(self) self.set_size(300, 200) size = (100, 100) hbox = wal.HBox(self) self.pack(hbox, padding=10) hbox.pack(Plate(hbox, size), padding=10)
def __init__(self): wal.MainWindow.__init__(self) self.set_size(300, 200) size = (50, 50) self.pack(wal.ColorPlate(self, size, bg=wal.BLACK)) hbox = wal.HBox(self) hbox.pack(wal.ColorPlate(hbox, size, bg=wal.GRAY)) self.pack(hbox)
def build(self): self.app.actions = self.actions self.app.mw = self self.mb = AppMenubar(self) self.toolbar = AppToolbar(self) #---CENTRAL PART self.workarea = wal.HidableVArea(self) self.workarea.pack(wal.HLine(self.workarea)) self.workarea.pack(ContextPanel(self.app, self.workarea)) self.workarea.pack(wal.HLine(self.workarea)) hbox = wal.HBox(self.workarea) self.tools = AppTools(self.app, hbox) hbox.pack(self.tools, padding=1) self.inner_hpaned = gtk.HPaned() self.nb = gtk.Notebook() self.nb.connect('switch-page', self.change_doc) self.nb.set_property('scrollable', True) self.inner_hpaned.pack1(self.nb, 1, 0) self.plugin_panel = PluginPanel(self) hbox.pack(self.inner_hpaned, True, True, padding=1) self.vpalette = VPalette(self.workarea, self.app) hbox.pack(self.vpalette, padding=2) self.workarea.pack(hbox, True, True) #---SPLASH self.nb_splash = Splash(self.workarea) self.workarea.pack2(self.nb_splash, True, True) self.hpalette = HPalette(self.workarea, self.app) self.workarea.pack(self.hpalette, padding=2) self.workarea.pack(wal.HLine(self.workarea)) self.statusbar = AppStatusbar(self.app, self.workarea) self.workarea.pack(self.statusbar) #---CENTRAL PART END self.pack(self.workarea, True, True) self.set_win_title() self.set_min_size(*config.mw_min_size) if config.mw_store_size: self.set_size(*config.mw_size) self.set_icon(rc.IMG_APP_ICON) self.center() if config.mw_maximized: self.maximize()
def __init__(self): wal.MainWindow.__init__(self) self.set_size(300, 200) hbox = wal.HBox(self) self.pack(hbox) self.cb1 = wal.ColorButton(hbox, (0, 0, 0), 'Select foreground', cmd=self.callback) hbox.pack(self.cb1, padding=30) self.cb2 = wal.ColorButton(hbox, (1, 1, 1), 'Select background', cmd=self.callback) hbox.pack(self.cb2, padding=30)
def __init__(self, master, app): self.app = app wal.HidableVBox.__init__(self, master) self.pack(wal.HLine(self), padding=1) box = wal.HBox(self) box.pack( wal.ImgButton(self, rc.IMG_PALETTE_DOUBLE_ARROW_LEFT, cmd=self.action_dback, repeat=True, flat=True)) box.pack( wal.ImgButton(self, rc.IMG_PALETTE_ARROW_LEFT, cmd=self.action_back, repeat=True, flat=True)) box.pack( wal.ClickableImage(self, rc.IMG_PALETTE_NO_COLOR, tooltip=_('Empthy pattern'), cmd=self.action_nocolor)) self.pw = HPaletteWidget(box, self.app) box.pack(self.pw, True, True, 1) box.pack( wal.ImgButton(self, rc.IMG_PALETTE_ARROW_RIGHT, cmd=self.action_forward, repeat=True, flat=True)) box.pack( wal.ImgButton(self, rc.IMG_PALETTE_DOUBLE_ARROW_RIGHT, cmd=self.action_dforward, repeat=True, flat=True)) self.pack(box, True, True) if config.palette_orientation == const.HORIZONTAL and config.palette_visible: self.set_visible(True) else: self.set_visible(False)
def __init__(self): wal.MainWindow.__init__(self) self.set_size(300, 200) hbox = wal.HBox(self) but = wal.ImgButton(hbox, wal.STOCK_ADD, tooltip='test', cmd=self.test) hbox.pack(but, padding=10) but = wal.ImgButton(hbox, wal.STOCK_EDIT, tooltip='test', cmd=self.test, flat=True) hbox.pack(but, padding=10) self.pack(hbox)
def __init__(self): wal.MainWindow.__init__(self) self.set_size(300, 200) hbox = wal.HBox(self) self.pack(hbox, padding=30) self.sb1 = wal.SpinButton(hbox, rng=(0.0, 10000.0), cmd=self.callback, check_focus=True) hbox.pack(self.sb1, padding=30) self.sb2 = wal.SpinButtonInt(hbox, rng=(-10, 20), cmd=self.callback, check_focus=True) hbox.pack(self.sb2, padding=30)
def __init__(self): wal.MainWindow.__init__(self) self.set_size(300, 200) hbox = wal.HBox(self) but = wal.ToggleButton(hbox, 'Test', cmd=self.test) hbox.pack(but, padding=10) but = wal.ToggleButton(hbox, 'FTest', cmd=self.test, flat=True) hbox.pack(but, padding=10) but = wal.ImgToggleButton(hbox, wal.STOCK_ABOUT, tooltip='test', cmd=self.test) hbox.pack(but, padding=10) but = wal.ImgToggleButton(hbox, wal.STOCK_CANCEL, tooltip='test', cmd=self.test) hbox.pack(but, padding=10) self.pack(hbox)
def __init__(self): wal.MainWindow.__init__(self) self.set_size(300, 200) self.box.set_border_width(10) hb = wal.HBox(self) hb.pack(wal.Button(hb, stock=wal.STOCK_ADD, cmd=self.add_cmd)) hb.pack(wal.Button(hb, stock=wal.STOCK_REMOVE, cmd=self.remove_cmd)) self.pack(hb) self.db = wal.DocBook(self, self.switch_cmd, self.close_cmd, wal.STOCK_FILE) self.dt = [ TestDoc(self.db, wal.GRAY, 'GRAY'), TestDoc(self.db, wal.WHITE, 'WHITE'), TestDoc(self.db, wal.BLACK, 'BLACK'), TestDoc(self.db, wal.BLUE, 'BLUE'), TestDoc(self.db, wal.GREEN, 'GREEN'), ] self.docs = [] self.pack(self.db, True, True)
def __init__(self, master, app, dlg): PrefsTab.__init__(self, master, app, dlg) self.get_config_vals() #Rendering intents frame self.intents = uc2const.INTENTS.keys() self.intents.sort() self.intents_names = [] for item in self.intents: self.intents_names.append(uc2const.INTENTS[item]) intent_frame = wal.Frame(self, ' ' + _('Rendering intents') + ' ') tab = gtk.Table(2, 2, False) tab.set_row_spacings(5) tab.set_col_spacings(10) tab.set_border_width(5) label = wal.Label(tab, _('Display/RGB intent:')) tab.attach(label, 0, 1, 0, 1, gtk.SHRINK, gtk.SHRINK) self.rgb_intent_combo = wal.ComboBoxText(tab, self.intents_names, cmd=self.update_vals) self.rgb_intent_combo.set_active(config.cms_rgb_intent) tab.attach(self.rgb_intent_combo, 1, 2, 0, 1, gtk.SHRINK, gtk.SHRINK) label = wal.Label(tab, _('Printer/CMYK intent:')) tab.attach(label, 0, 1, 1, 2, gtk.SHRINK, gtk.SHRINK) self.cmyk_intent_combo = wal.ComboBoxText(tab, self.intents_names, cmd=self.update_vals) self.cmyk_intent_combo.set_active(config.cms_cmyk_intent) tab.attach(self.cmyk_intent_combo, 1, 2, 1, 2, gtk.SHRINK, gtk.SHRINK) intent_frame.add(tab) self.pack(intent_frame) #Printer simulation printer_frame = wal.Frame(self) txt = _('Simulate Printer on the Screen') self.printer_check = wal.CheckButton(printer_frame, txt, True, self.update_vals) printer_frame.set_label_widget(self.printer_check) vbox = wal.VBox(printer_frame) vbox.set_border_width(10) printer_frame.add(vbox) txt = _('Show colors that are out of the printer gamut') self.gamut_check = wal.CheckButton(vbox, txt, cmd=self.update_vals) vbox.pack(self.gamut_check, True, True) hbox = wal.HBox(printer_frame) self.alarm_label = wal.Label(hbox, 'Alarm color:') hbox.pack(self.alarm_label, padding=5) self.cb = wal.ColorButton(hbox, self.alarmcodes, _('Select alarm color'), cmd=self.update_vals) hbox.pack(self.cb, padding=5) vbox.pack(hbox, True, True) txt = _('Separation for SPOT colors') self.spot_check = wal.CheckButton(vbox, txt, cmd=self.update_vals) vbox.pack(self.spot_check, padding=5) self.pack(printer_frame) #Flags txt = _('Use Blackpoint Compensation') self.bpc_check = wal.CheckButton(self, txt, cmd=self.update_vals) self.pack(self.bpc_check, padding=5) txt = _('Use Black preserving transforms') self.bpt_check = wal.CheckButton(self, txt, cmd=self.update_vals) self.pack(self.bpt_check) self.update_widgets()