Skip to content

Commit

Permalink
Update window.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Nokse22 authored Dec 15, 2023
1 parent f50dc4a commit 385dbdb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,14 +310,12 @@ def colorAppBackground(self):
# context.add_provider(style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)

def wordPerMinuteToSpeed(self, speed):
# Split the font string into font properties and size
font_properties = self.settings.font.split()
font_size = font_properties[-1]

# Convert the font size to an integer and increase it by +5 or -5
font = int(font_size)
width = self.textview.get_allocation().width
speed = self.settings.speed * font * 0.2 / width # self.settings.speed * 4/ ((-font*0.2 + 0.05*width)*font*2.62) # to rework
speed = self.settings.speed * font * 0.2 / width

if speed <= 0.25:
speed = 0.25
Expand Down

0 comments on commit 385dbdb

Please sign in to comment.