gtk: fix font ratio for insanely wide screens
This commit is contained in:
parent
cd8929bcb0
commit
a19661ca90
@ -9,7 +9,7 @@ klipperscreendir = os.getcwd()
|
|||||||
|
|
||||||
class KlippyGtk:
|
class KlippyGtk:
|
||||||
labels = {}
|
labels = {}
|
||||||
font_ratio = 51
|
font_ratio = [51, 30]
|
||||||
width_ratio = 16
|
width_ratio = 16
|
||||||
height_ratio = 9.375
|
height_ratio = 9.375
|
||||||
|
|
||||||
@ -17,7 +17,10 @@ class KlippyGtk:
|
|||||||
self.width = width
|
self.width = width
|
||||||
self.height = height
|
self.height = height
|
||||||
|
|
||||||
self.font_size = int(round(self.width / self.font_ratio))
|
self.font_size = int(min(
|
||||||
|
self.width / self.font_ratio[0],
|
||||||
|
self.height / self.font_ratio[1]
|
||||||
|
))
|
||||||
self.header_size = int(round((self.width / self.width_ratio) / 1.33))
|
self.header_size = int(round((self.width / self.width_ratio) / 1.33))
|
||||||
self.img_width = int(round(self.width / self.width_ratio))
|
self.img_width = int(round(self.width / self.width_ratio))
|
||||||
self.img_height = int(round(self.height / self.height_ratio))
|
self.img_height = int(round(self.height / self.height_ratio))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user