def __init__(self): self.title = 'randomize' self.height = (self.spinner_height * 2) + (self.padding_y * 4) + self.button_height # self.column_1 = 40 self.w = FloatingWindow((self.width, self.height), self.title) # minimum random value x = 0 y = self.padding_y self.w.spinner_min = Spinner((x, y), default=self.rand_min, integer=False, scale=0.01, digits=2, label='min') # maximum random value y += self.w.spinner_min.getPosSize()[3] self.w.spinner_max = Spinner((x, y), default=self.rand_max, integer=False, scale=0.01, digits=2, label='max') # apply button x = self.padding_x y += self.w.spinner_max.getPosSize()[3] self.w.apply_button = SquareButton( (x, y, -self.padding_x, self.button_height), 'apply', sizeStyle=self.size_style, callback=self.apply_callback) # done self.w.open()
def __init__(self): self.title = 'shift' self.column1 = 51 self.width = (self.nudge_button * 6) + (self.padding_x * 2) - 5 self.small_button = (self.width - (self.padding_x * 2)) / 2 self.height = (self.text_height * 4) + (self.padding_y * 9) + ( self.nudge_button * 2) + (self.button_height * 1) + 5 self.w = FloatingWindow((self.width, self.height), self.title) # position x = 0 y = self.padding_y self.w.spinner_pos = Spinner((x, y), default='100', integer=True, label='pos') # delta y += self.w.spinner_pos.getPosSize()[3] self.w.spinner_delta = Spinner((x, y), default='100', integer=True, label='delta') # axis x = self.padding_x y += self.w.spinner_delta.getPosSize()[3] self.w.axis_label = TextBox((x, y, self.column1, self.text_height), "axis", sizeStyle=self.size_style) x = self.column1 self.w._axis = RadioGroup((x, y, -self.padding_x, self.text_height), ["x", "y"], sizeStyle=self.size_style, isVertical=False) self.w._axis.set(self.axis) # apply buttons x = self.padding_x y += (self.text_height + self.padding_y) self.w.button_minus = SquareButton( (x, y, self.small_button + 1, self.button_height), '-', callback=self.shift_minus_callback) x += self.small_button self.w.button_plus = SquareButton( (x, y, self.small_button, self.button_height), '+', callback=self.shift_plus_callback) # switch sides x = self.padding_x y += (self.button_height + self.padding_y) self.w._side = CheckBox((x, y, -self.padding_x, self.text_height), "invert side", value=False, sizeStyle=self.size_style) y += self.text_height self.w._layers = CheckBox((x, y, -self.padding_x, self.text_height), "all layers", value=self.layers, sizeStyle=self.size_style) # open window self.w.open()
def __init__(self): self.title = "anchors" # self.height = 300 self.height = self.nudge_button * 2 + self.text_height * 9 + self.padding * 6 + self.button_height # create window self.w = FloatingWindow((self.width, self.height), self.title) # anchors top x = y = p = self.padding self.w.top = CheckBox((x, y, -p, self.text_height), "top", value=True, sizeStyle=self.size_style) x = 0 y += self.text_height + p self.w.spinner_top = Spinner((x, y), default=20, scale=1, integer=True, label='position') # anchors bottom x = p y += self.w.spinner_top.getPosSize()[3] self.w.bottom = CheckBox((x, y, -p, self.text_height), "bottom", value=True, sizeStyle=self.size_style) x = 0 y += self.text_height + p self.w.spinner_bottom = Spinner((x, y), default=20, scale=1, integer=True, label='position') # base or accent x = p y += self.w.spinner_bottom.getPosSize()[3] # + p self.w.accent = RadioGroup((x, y, -p, self.text_height * 2), ['base', 'accent'], sizeStyle=self.size_style, isVertical=True) self.w.accent.set(0) # clear anchors x = p y += self.text_height * 2 + p self.w.clear = CheckBox((x, y, -p, self.text_height), "clear", value=True, sizeStyle=self.size_style) # apply button y += self.text_height + p self.w.button_apply = SquareButton((x, y, -p, self.button_height), "create", callback=self.apply_callback, sizeStyle=self.size_style) # open dialog self.w.open()
def __init__(self): self.title = "scale" self.width = (self.nudge_button * 6) + (self.padding_x * 2) - 5 self.height = (self.nudge_button * 2) + (self.padding_y * 6) + ( self.text_height * 3) + (self.button_height * 2) self.w = FloatingWindow((self.width, self.height), self.title) # checkboxes x = self.padding_x y = self.padding_y self.w._metrics_x = CheckBox((x, y, -self.padding_x, self.text_height), "side-bearings", value=self.x_metrics, sizeStyle=self.size_style, callback=self._metrics_x_callback) y += self.text_height self.w._metrics_y = CheckBox((x, y, -self.padding_x, self.text_height), "vertical metrics", value=self.y_metrics, sizeStyle=self.size_style, callback=self._metrics_y_callback) y += self.text_height self.w._layers = CheckBox((x, y, -self.padding_x, self.text_height), "all layers", value=self.layers, sizeStyle=self.size_style, callback=self._layers_callback) # scale factor x = 0 y += (self.text_height + self.padding_y) self.w.spinner = Spinner((x, y), default=self.scale_value, scale=.01, integer=False, label='factor') # buttons x = self.padding_x y += self.w.spinner.getPosSize()[3] button_width = (self.width * 0.5) - self.padding_x self.w.button_x = SquareButton( (x, y, button_width, self.button_height), 'x', sizeStyle=self.size_style, callback=self._apply_callback_x) x += button_width - 1 self.w.button_y = SquareButton( (x, y, button_width + 1, self.button_height), 'y', sizeStyle=self.size_style, callback=self._apply_callback_y) x = self.padding_x y += (self.button_height + self.padding_y) self.w.apply_button = SquareButton( (x, y, -self.padding_x, self.button_height), 'proportional', sizeStyle=self.size_style, callback=self._apply_callback) # open window self.w.open()
def __init__(self): self.title = 'width' self.height = self.button_height + ( self.text_height * 5) + self.nudge_button + (self.padding_y * 6) self.w = FloatingWindow((self.width, self.height), self.title) # left x = self.padding_x y = self.padding_y # mode self.w.width_mode = RadioGroup( (x, y, -self.padding_x, self.text_height), ['=', '+', '-'], sizeStyle=self.size_style, callback=self.mode_callback, isVertical=False) self.w.width_mode.set(0) # width value x = 0 y += (self.text_height + self.padding_y) self.w.spinner = Spinner((x, y), default=self._width_, integer=True, label='width') # center x = self.padding_x y += self.w.spinner.getPosSize()[3] self.w.center_checkbox = CheckBox( (x, y, -self.padding_x, self.text_height), "center glyphs", value=False, sizeStyle=self.size_style, callback=self.center_callback) # split difference y += self.text_height self.w.split_checkbox = CheckBox( (x, y, -self.padding_x, self.text_height), "split difference", value=False, sizeStyle=self.size_style, callback=self.split_callback) # split relative y += self.text_height self.w.split_relative_checkbox = CheckBox( (x, y, -self.padding_x, self.text_height), "relative split", value=False, sizeStyle=self.size_style, callback=self.split_relative_callback) # apply button x = self.padding_x y += (self.text_height + self.padding_y) self.w.button_apply = SquareButton( (x, y, -self.padding_x, self.button_height), "apply", callback=self.apply_callback, sizeStyle=self.size_style) # open window self.w.open()
def __init__(self): self.title = "vmetrics" self.height = (self.spinner_height*5) + (self.padding_y*6) + 1 self.w = FloatingWindow((self.width, self.height), self.title) x = 0 y = self.padding_y self.w.emsquare = Spinner( (x, y), default='1000', scale=1, integer=True, label='ems') y += self.spinner_height + self.padding_y self.w.xheight = Spinner( (x, y), default='500', scale=1, integer=True, label='xht') y += self.spinner_height + self.padding_y self.w.capheight = Spinner( (x, y), default='700', scale=1, integer=True, label='cap') y += self.spinner_height + self.padding_y self.w.ascender = Spinner( (x, y), default='800', scale=1, integer=True, label='asc') y += self.spinner_height + self.padding_y self.w.descender = Spinner( (x, y), default='200', scale=1, integer=True, label='dsc') y += self.spinner_height + self.padding_y self.w.open()
def __init__(self): self.title = 'element' self.column_1 = 40 self.height = (self.text_height) + (self.spinner_height * 2) + ( self.padding_y * 5) + self.button_height self.w = FloatingWindow((self.width, self.height), self.title) # element size x = 0 y = self.padding_y self.w.spinner_size = Spinner((x, y), default='100', integer=True, label='size') # shape x = self.padding_x y += self.spinner_height + self.padding_y self.w.shape = RadioGroup((x, y, -self.padding_x, self.text_height), ['r', 'o', 's'], sizeStyle=self.size_style, isVertical=False) self.w.shape.set(0) # magic x = 0 y += self.text_height + self.padding_y self.w.spinner_magic = Spinner((x, y), default='0.552', integer=False, scale=.001, digits=3, label='curve') # set element x = self.padding_x y += self.spinner_height + self.padding_y self.w.button_set_element = SquareButton( (x, y, -self.padding_x, self.button_height), "apply", sizeStyle=self.size_style, callback=self.set_element_callback) # open window self.w.open()
def __init__(self, verbose=True): self.title = "move" self.verbose = verbose self.height = (self.square_button * 3) + (self.padding_y * 5) + (self.text_height * 4) - 7 self.w = FloatingWindow((self.width, self.height), self.title) # arrows x = 0 y = 0 self.w.arrows = Arrows((x, y), callbacks=dict( left=self.left_callback, right=self.right_callback, up=self.up_callback, down=self.down_callback, leftDown=self.down_left_callback, rightDown=self.down_right_callback, leftUp=self.up_left_callback, rightUp=self.up_right_callback, ), arrows=[ 'left', 'right', 'up', 'down', 'leftUp', 'leftDown', 'rightUp', 'rightDown', ]) # spinner x = 0 y += self.w.arrows.getPosSize()[3] self.w.spinner = Spinner((x, y), default='20', integer=True, label='delta') # checkboxes x = self.padding_x y += self.w.spinner.getPosSize()[3] self.w.foreground = CheckBox((x, y, -self.padding_x, self.text_height), "foreground", value=True, sizeStyle=self.size_style) y += self.text_height self.w.layers = CheckBox((x, y, -self.padding_x, self.text_height), "layers", value=False, sizeStyle=self.size_style) # open dialog self.w.open()
def __init__(self, ): self.title = 'outliner' self.column_1 = 40 self.height = self.button_height + (self.padding_y * 5) + (self.text_height * 4) - 2 self.w = FloatingWindow((self.width, self.height), self.title) # delta spinner x = 0 y = self.padding_y self.w.delta_spinner = Spinner((x, y), default='60', integer=True, label='delta') # outline options x = self.padding_x y += self.w.delta_spinner.getPosSize()[3] # join label x = self.padding_x self.w.join_label = TextBox((x, y, -self.padding_x, self.nudge_button), "join", sizeStyle=self.size_style) x += self.column_1 # join options self.w.join = RadioGroup((x, y, -self.padding_x, self.nudge_button), ['S', 'R', 'B'], sizeStyle=self.size_style, isVertical=False) self.w.join.set(self.join) # cap label x = self.padding_x y += self.nudge_button + 5 self.w.cap_label = TextBox((x, y, -self.padding_x, self.nudge_button), "cap", sizeStyle=self.size_style) x += self.column_1 # cap options self.w.cap = RadioGroup((x, y, -self.padding_x, self.nudge_button), ['S', 'R', 'B'], sizeStyle=self.size_style, isVertical=False) self.w.cap.set(self.join) # apply x = self.padding_x y += self.nudge_button + self.padding_y self.w.button_apply = SquareButton( (x, y, -self.padding_x, self.button_height), "apply", sizeStyle=self.size_style, callback=self.apply_callback) # open window self.w.open()
def __init__(self): self.title = 'rasterizer' self.column_1 = 40 self.box = 20 self.height = self.progress_bar + (self.padding_y * 7) + (self.square_button * 3) self.w = FloatingWindow((self.width, self.height), self.title) # grid size x = 0 y = self.padding_y self.w.spinner = Spinner((x, y), default='120', integer=True, label='grid') # rasterize button x = self.padding_x y += self.w.spinner.getPosSize()[3] # y += self.nudge_button + self.padding_y self.w.button_rasterize = SquareButton( (x, y, -self.padding_x, self.button_height), "rasterize", sizeStyle=self.size_style, callback=self._rasterize_callback) # progress bar y += self.progress_bar + self.padding_y self.w.bar = ProgressBar( (x, y + 2, -self.padding_x, self.progress_bar), isIndeterminate=True, sizeStyle=self.size_style) # print button y += self.progress_bar + self.padding_y - 1 self.w.button_print = SquareButton( (x, y, -self.padding_x, self.button_height), "print", sizeStyle=self.size_style, callback=self._print_callback) # scan button y += self.button_height + self.padding_y self.w.button_scan = SquareButton( (x, y, -self.padding_x, self.button_height), "scan", callback=self._scan_callback, sizeStyle=self.size_style) # open window self.w.open()
def __init__(self): self.title = "nudge" self.height = (self.square_button * 3) + (self.text_height * 3) + (self.padding_y * 4) self.w = FloatingWindow((self.width, self.height), self.title) # nudge buttons x = self.padding_x y = self.padding_y self.w.arrows = Arrows( (x, y), callbacks=dict( left=self.left_callback, right=self.right_callback, up=self.up_callback, down=self.down_callback, leftDown=self.down_left_callback, rightDown=self.down_right_callback, leftUp=self.up_left_callback, rightUp=self.up_right_callback, ), arrows=[ 'left', 'right', 'up', 'down', 'leftUp', 'leftDown', 'rightUp', 'rightDown', ]) # nudge spinners x = 0 y += self.w.arrows.getPosSize()[3] - self.padding_y self.w.nudge_value = Spinner( (x, y), default=self.nudge, integer=True, label='delta') # interpolate x = self.padding_x y += self.w.nudge_value.getPosSize()[3] self.w.interpolated = CheckBox( (x, y, -self.padding_x, self.text_height), "interpolated", value=self.interpolated, sizeStyle=self.size_style, callback=self.interpolated_callback) # open dialog self.w.open()
def __init__(self): self.title = "skew" self.width = (self.nudge_button * 6) + (self.padding_x * 2) - 5 self.square_button = (self.width - (self.padding_x * 2) + 2) / 2 self.height = self.square_button + (self.padding_y * 5) + ( self.nudge_button * 2) + self.text_height - 4 self.w = FloatingWindow((self.width, self.height), self.title) # skew buttons x = self.padding_x y = self.padding_y self.w._skew_x_minus_button = SquareButton( (x, y, self.square_button, self.square_button), unichr(8672), callback=self._skew_minus_callback) x += (self.square_button - 1) self.w._skew_x_plus_button = SquareButton( (x, y, self.square_button, self.square_button), unichr(8674), callback=self._skew_plus_callback) # scale factor x = 0 y += (self.square_button + self.padding_y) self.w.spinner = Spinner((x, y), default='1.0', scale=.01, integer=False, label='angle') x = self.padding_x y += self.w.spinner.getPosSize()[3] # checkboxes self.w.offset_x_checkbox = CheckBox( (x, y, -self.padding_x, self.text_height), "from middle", sizeStyle=self.size_style, value=self.offset_x, callback=self._offset_x_callback) # open window self.w.open()
def __init__(self): self.title = "anchors" self.width = (self.square_button * 3) + (self.padding_x * 2) - 2 self.height = (self.square_button * 3) + (self.padding_y * 7) + (self.text_height * 3) + self.nudge_button + 3 self.w = FloatingWindow((self.width, self.height), self.title) #--------------- # arrow buttons #--------------- x = 0 y = 0 self.w.arrows = Arrows( (x, y), callbacks=dict( left=self.left_callback, right=self.right_callback, up=self.up_callback, down=self.down_callback, leftDown=self.down_left_callback, rightDown=self.down_right_callback, leftUp=self.up_left_callback, rightUp=self.up_right_callback, ), arrows=[ 'left', 'right', 'up', 'down', 'leftUp', 'leftDown', 'rightUp', 'rightDown', ]) #---------- # spinners #---------- x = 0 y += self.w.arrows.getPosSize()[3] self.w.spinner = Spinner( (x, y), default=self.move_default, integer=True, label='delta') #------------ # checkboxes #------------ # top anchors x = self.padding_x y += self.w.spinner.getPosSize()[3] shift_x = ((self.width - (self.padding_x * 2)) / 4) + 1 self.w.anchors_top = CheckBox( (x, y, -self.padding_x, self.text_height), "T", value=self.anchors_top, sizeStyle=self.size_style) # bottom anchors x += shift_x self.w.anchors_bottom = CheckBox( (x, y, -self.padding_x, self.text_height), "B", value=self.anchors_bottom, sizeStyle=self.size_style) x += shift_x self.w.anchors_left = CheckBox( (x, y, -self.padding_x, self.text_height), "L", value=self.anchors_left, sizeStyle=self.size_style) x += shift_x self.w.anchors_right = CheckBox( (x, y, -self.padding_x, self.text_height), "R", value=self.anchors_right, sizeStyle=self.size_style) # base anchors x = self.padding_x y += self.text_height + (self.padding_y / 2) self.w.anchors_base = CheckBox( (x, y, -self.padding_x, self.text_height), "base", value=self.anchors_base, sizeStyle=self.size_style) # accent anchors x += (shift_x * 2) - 3 self.w.anchors_accents = CheckBox( (x, y, -self.padding_x, self.text_height), "accent", value=self.anchors_accents, sizeStyle=self.size_style) # all layers x = self.padding_x y += self.text_height + (self.padding_y / 2) self.w.anchors_layers = CheckBox( (x, y, -self.padding_x, self.text_height), "all layers", value=self.anchors_layers, sizeStyle=self.size_style) # open dialog self.w.open()
def __init__(self): self.title = 'margins' self.height = (self.text_height * 4) + (self.padding_y * 10) + ( self.nudge_button * 4) + self.button_height self.w = FloatingWindow((self.width, self.height), self.title) # left mode x = self.padding_x y = self.padding_y self.w.left_mode = RadioGroup( (x, y, -self.padding_x, self.text_height), ['=', '+', '-'], sizeStyle=self.size_style, isVertical=False) self.w.left_mode.set(0) # left value x = 0 y += (self.text_height + 10) self.w.spinner_left = Spinner((x, y), default=self.left_value, integer=True, label='left') # right mode x = self.padding_x y += self.w.spinner_left.getPosSize()[3] self.w.right_mode = RadioGroup( (x, y, -self.padding_x, self.text_height), ['=', '+', '-'], sizeStyle=self.size_style, callback=self.right_mode_callback, isVertical=False) self.w.right_mode.set(0) # right value x = 0 y += (self.text_height + self.padding_y) self.w.spinner_right = Spinner((x, y), default=self.right_value, integer=True, label='right') # apply button x = self.padding_x y += self.w.spinner_right.getPosSize()[3] self.w.button_apply = SquareButton( (x, y, -self.padding_x, self.button_height), "apply", sizeStyle=self.size_style, callback=self.apply_callback) y += (self.button_height + self.padding_y) # checkboxes self.w.left_checkbox = CheckBox( (x, y, (self.width * 0.5) - self.padding_x, self.text_height), "left", value=self.left, sizeStyle=self.size_style) x += (self.width * 0.5) - self.padding_x self.w.right_checkbox = CheckBox( (x, y, (self.width * 0.5) - self.padding_x, self.text_height), "right", value=self.right, sizeStyle=self.size_style) # use beam x = self.padding_x y += (self.text_height + self.padding_y) self.w.use_beam = CheckBox( (x, y, (self.width * 0.5) - self.padding_x, self.text_height), "beam", value=False, sizeStyle=self.size_style) x += (self.width * 0.5) - self.padding_x self.w.beam_y = EditText( (x, y, (self.width * 0.5) - self.padding_x, self.text_height), "400", sizeStyle=self.size_style) # open window self.w.open()
def __init__(self): self.get_fonts() # window self.title = 'condense' self.height = (self.nudge_button * 2) + (self.text_height * 6) + self.progress_bar + ( self.padding_y * 5) + (self.button_height * 1) self.w = FloatingWindow((self.width, self.height), title=self.title) # master 1 (regular) x = self.padding_x y = self.padding_y - 8 self.w._f1_label = TextBox( (x, y + 3, -self.padding_x, self.text_height), "regular", sizeStyle=self.size_style) y += self.text_height self.w._f1_font = PopUpButton( (x, y, -self.padding_x, self.text_height), sorted(self.all_fonts.keys()), sizeStyle=self.size_style) y += self.text_height # master 2 (bold) self.w._f2_label = TextBox( (x, y + 3, -self.padding_x, self.text_height), "bold", sizeStyle=self.size_style) y += self.text_height self.w._f2_font = PopUpButton( (x, y, -self.padding_x, self.text_height), sorted(self.all_fonts.keys()), sizeStyle=self.size_style) y += self.text_height # target self.w._f3_label = TextBox( (x, y + 3, -self.padding_x, self.text_height), "target", sizeStyle=self.size_style) y += self.text_height self.w._f3_font = PopUpButton( (x, y, -self.padding_x, self.text_height), sorted(self.all_fonts.keys()), sizeStyle=self.size_style) y += (self.text_height + self.padding_y) # factor x = 0 self.w.spinner = Spinner((x, y), default=self.factor, scale=.01, integer=False, label='factor') # apply buttons x = self.padding_x y += self.w.spinner.getPosSize()[3] # y += (self.text_height + self.padding_y) - 3 self.w.button_apply = SquareButton( (x, y, -self.padding_x, self.button_height), "condense", callback=self.apply_callback, sizeStyle=self.size_style) # progress bar y += (self.button_height + self.padding_y) self.w.bar = ProgressBar((x, y, -self.padding_x, self.progress_bar), isIndeterminate=True, sizeStyle=self.size_style) # bind self.w.bind("became key", self.update_callback) self.w.bind("close", self.on_close_window) # observers addObserver(self, "update_callback", "newFontDidOpen") addObserver(self, "update_callback", "fontDidOpen") addObserver(self, "update_callback", "fontDidClose") # open window self.w.open()
def __init__(self): self._get_fonts() # window self.title = 'insterpol' self.height = (self.nudge_button * 4) + (self.text_height * 7) + self.progress_bar + ( self.padding_y * 9) + (self.button_height) - 10 self.value_box = 60 self.column_2 = self.value_box + (self.nudge_button * 7) - 6 self.w = FloatingWindow((self.width, self.height), self.title) # master 1 x = self.padding_x y = self.padding_y - 8 self.w._f1_label = TextBox( (x, y + 3, -self.padding_x, self.text_height), "master 1", sizeStyle=self.size_style) y += self.text_height self.w._f1_font = PopUpButton( (x, y, -self.padding_x, self.text_height), sorted(self.all_fonts.keys()), sizeStyle=self.size_style) y += self.text_height # master 2 self.w._f2_label = TextBox( (x, y + 3, -self.padding_x, self.text_height), "master 2", sizeStyle=self.size_style) y += self.text_height self.w._f2_font = PopUpButton( (x, y, -self.padding_x, self.text_height), sorted(self.all_fonts.keys()), sizeStyle=self.size_style) y += self.text_height # target self.w._f3_label = TextBox( (x, y + 3, -self.padding_x, self.text_height), "target font", sizeStyle=self.size_style) y += self.text_height self.w._f3_font = PopUpButton( (x, y, -self.padding_x, self.text_height), sorted(self.all_fonts.keys()), sizeStyle=self.size_style) # factor x x = 0 y += (self.text_height + self.padding_y) self.w._factor_x = Spinner((x, y), default='0.50', scale=.01, integer=False, label='x factor') # factor y y += self.w._factor_x.getPosSize()[3] self.w._factor_y = Spinner((x, y), default='0.50', scale=.01, integer=False, label='y factor') # proporional x = self.padding_x y += self.w._factor_y.getPosSize()[3] self.w._proportional_checkbox = CheckBox( (x, y, -self.padding_x, self.text_height), "proportional", value=self.proportional, sizeStyle=self.size_style, callback=self._proportional_callback) # apply button x = self.padding_x y += (self.text_height + self.padding_y) - 3 self.w.button_apply = SquareButton( (x, y, -self.padding_x, self.button_height), "interpolate", callback=self.apply_callback, sizeStyle=self.size_style) # progress bar y += (self.button_height + self.padding_y) self.w.bar = ProgressBar((x, y, -self.padding_x, self.progress_bar), isIndeterminate=True, sizeStyle=self.size_style) # bind self.w.bind("became key", self.update_callback) self.w.bind("close", self.on_close_window) # observers addObserver(self, "update_callback", "newFontDidOpen") addObserver(self, "update_callback", "fontDidOpen") addObserver(self, "update_callback", "fontDidClose") # open window self.w.open()
def __init__(self): self.title = 'gridfit' self.column_1 = 40 self.width = 123 self.height = self.button_height + self.nudge_button + ( self.text_height * 7) + (self.padding_y * 5) - 3 self.w = FloatingWindow((self.width, self.height), self.title) # grid size x = 0 y = self.padding_y self.w.spinner = Spinner((x, y), default='25', integer=True, label='grid') # apply button x = self.padding_x y += self.w.spinner.getPosSize()[3] self.w.button_apply = SquareButton( (x, y, -self.padding_x, self.button_height), "apply", callback=self.apply_callback, sizeStyle=self.size_style) # b-points y += (self.button_height + self.padding_y) self.w._b_points_checkBox = CheckBox( (x, y, -self.padding_x, self.text_height), "bPoints", value=self.b_points, sizeStyle=self.size_style) # points y += self.text_height self.w._points_checkBox = CheckBox( (x, y, -self.padding_x, self.text_height), "points", value=self.points, sizeStyle=self.size_style) # margins y += self.text_height self.w._margins_checkBox = CheckBox( (x, y, -self.padding_x, self.text_height), "margins", value=self.margins, sizeStyle=self.size_style) # width y += self.text_height self.w._width_checkBox = CheckBox( (x, y, -self.padding_x, self.text_height), "width", value=self.glyph_width, sizeStyle=self.size_style) # anchors y += self.text_height self.w._anchors_checkBox = CheckBox( (x, y, -self.padding_x, self.text_height), "anchors", value=self.anchors, sizeStyle=self.size_style) # all layers y += self.text_height self.w._layers_checkBox = CheckBox( (x, y, -self.padding_x, self.text_height), "all layers", value=self.layers, sizeStyle=self.size_style) # open self.w.open()