Commit d8db46ab authored by André Anjos's avatar André Anjos 💬

[gui] Increase the font size for macos

parent 804f10e9
Pipeline #26479 passed with stages
in 13 minutes and 3 seconds
......@@ -232,7 +232,7 @@ class AnnotatorApp(tkinter.Tk):
self.canvas = None #the main canvas
self.filter = False
self._update_image()
self._rebuild_interface()
def zoom_point(self, p):
......@@ -275,8 +275,8 @@ class AnnotatorApp(tkinter.Tk):
return [self.unzoom_point(p) for p in points]
def _update_image(self):
"""Updates the image displayed"""
def _rebuild_interface(self):
"""Updates the displayed interface"""
# loads the current image, creates the image canvas
bob_image = bob.io.base.load(self.filelist[self.curr_pos])
......@@ -305,7 +305,7 @@ class AnnotatorApp(tkinter.Tk):
if self.canvas is None:
self.font = tkinter.font.Font(size=10)
self.font = tkinter.font.Font(size=12)
self.frames = {}
self.buttons = {}
self.labels = {}
......@@ -430,7 +430,7 @@ class AnnotatorApp(tkinter.Tk):
f.grid(row=3, sticky=_grid_expand)
v = self.variables['pointer-position'] = tkinter.StringVar()
v.set('x: 0, y: 0')
v.set('(0, 0)')
l = self.labels['pointer-position'] = tkinter.Label(f, textvariable=v,
font=self.font)
l.grid(row=0, sticky=tkinter.W)
......@@ -517,8 +517,9 @@ class AnnotatorApp(tkinter.Tk):
self.variables['image-progress'].set('#%d out of %d' % (self.curr_pos+1,
len(self.filelist)))
self.variables['annotation-numpoints'].set('This object: %d points' % \
len(self.curr_annotation))
self.variables['annotation-numpoints'].set('#%d: %d point%s' % \
(self.annotation.index(self.curr_annotation)+1,
len(self.curr_annotation), '' if len(self.curr_annotation)==1 else 's'))
self.variables['annotation-progress'].set('#%d out of %d' % (
self.annotation.index(self.curr_annotation)+1, len(self.annotation)))
......@@ -529,8 +530,7 @@ class AnnotatorApp(tkinter.Tk):
# set the current pointer position, relative to the image
y, x = self.unzoom_point(self._current_pointer_position())
self.variables['pointer-position'].set('x: %d, y: %d' % \
(x, y))
self.variables['pointer-position'].set('(%d, %d)' % (x, y))
def save(self, *args, **kwargs):
......@@ -596,7 +596,7 @@ class AnnotatorApp(tkinter.Tk):
self.curr_pos -= 1
if self.curr_pos < 0:
self.curr_pos = len(self.filelist)-1
self._update_image()
self._rebuild_interface()
def next_frame(self, event=None):
......@@ -607,7 +607,7 @@ class AnnotatorApp(tkinter.Tk):
logger.debug('Advancing to next image...')
if self.curr_pos >= len(self.filelist):
self.curr_pos = 0
self._update_image()
self._rebuild_interface()
def on_pointer_motion(self, event):
......@@ -764,10 +764,10 @@ class AnnotatorApp(tkinter.Tk):
if self.filter:
self.filter = False
self._update_image()
self._rebuild_interface()
else:
self.filter = True
self._update_image()
self._rebuild_interface()
def add_keyboard_bindings(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment