예제 #1
0
파일: hcywheel.py 프로젝트: alown/mypaint
 def __load_clicked(self, button):
     preview = HCYMaskPreview()
     preview.set_size_request(128, 128)
     pal = Palette.load_via_dialog(title=_("Load mask from a Gimp palette"), parent=self, preview=preview)
     if pal is None:
         return
     self.editor.set_mask_from_palette(pal)
예제 #2
0
 def __load_btn_clicked(self, button):
     preview = _PalettePreview()
     manager = self.__target.get_color_manager()
     datapath = manager.get_data_path()
     palettes_dir = os.path.join(datapath, DATAPATH_PALETTES_SUBDIR)
     palette = Palette.load_via_dialog(title=_("Load palette"),
                                       parent=self,
                                       preview=preview,
                                       shortcuts=[palettes_dir])
     if palette is not None:
         self.__view.set_palette(palette)