dialect-app / dialect

A translation app for GNOME.
https://dialectapp.org/
GNU General Public License v3.0
597 stars 69 forks source link

Chagning the font size doesn't work. #387

Closed HubKing closed 5 months ago

HubKing commented 5 months ago

Arch Plasma 6.0.4

Screencast_20240426_002650.webm

mufeedali commented 5 months ago

https://github.com/dialect-app/dialect/commit/7504318d97d9796fb35d92736eed1a2bb64e300d should fix this.

@rafaelmardojai Let's test and merge #382 and do a quick release.

mufeedali commented 5 months ago

Nvm, https://github.com/dialect-app/dialect/commit/7504318d97d9796fb35d92736eed1a2bb64e300d does not in fact fix this.

@HubKing Are you using any specific font changes on Arch? I'm currently on Arch and Plasma 6.0.4 as well and am unable to reproduce this issue.

mufeedali commented 5 months ago

Do you have any fontconfig changes? Do you have XDG portals setup correctly?

Could you try running the app through the terminal like this: flatpak run app.drey.Dialect and check for any errors?

The problem with Arch is that we have no idea exactly how your setup is configured... So it's really difficult to reproduce issues like this.

HubKing commented 5 months ago
Traceback (most recent call last):
  File "/app/share/dialect/dialect/widgets/textview.py", line 33, in __init__
    self._font_size = int(
                      ^^^^
ValueError: invalid literal for int() with base 10: 'Sans,'
Traceback (most recent call last):
  File "/app/share/dialect/dialect/widgets/textview.py", line 33, in __init__
    self._font_size = int(
                      ^^^^
ValueError: invalid literal for int() with base 10: 'Sans,'
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/gi/_propertyhelper.py", line 401, in obj_set_property
    prop.fset(self, value)
  File "/app/share/dialect/dialect/widgets/textview.py", line 52, in font_size
    self._font_css_provider.load_from_data(f'textview {{ font-size: { str(value) }pt; }}')
    ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TextView' object has no attribute '_font_css_provider'
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/gi/_propertyhelper.py", line 401, in obj_set_property
    prop.fset(self, value)
  File "/app/share/dialect/dialect/widgets/textview.py", line 52, in font_size
    self._font_css_provider.load_from_data(f'textview {{ font-size: { str(value) }pt; }}')
    ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TextView' object has no attribute '_font_css_provider'
mufeedali commented 5 months ago

@HubKing thanks a lot for the logs! I've committed a fix: 70e12f403ca064364ec8ef54d696e4b1b8dcf9be Will be available in next release :)