Closed frandavid100 closed 4 months ago
I assume you haven't change the "Limit note width" setting? If so then this is mostly expected, though I agree that it should probably be able to go smaller than the fixed width, just not larger.
Ok, so I looked into this and it appears to be expected behaviour with GTK4/Adwaita apps and the SourceView control that Folio uses.
Basically "Limit note width" is mislabelled, it should be "Set fixed note width".
Trying to auto re-size the widget would go against several of the GTK4/Adwaita principals so I'm not going to attempt that as it will just break again in the future more than likely.
Instead I'm going to commit two changes to resolve this issue:
libadwaita maintainer here, someone pinged me to take a look at this issue and I have no idea what principles you mean.
@alice-mkh thanks, I'm new to GTK/libadwaita but from what I saw it looks like monitoring window size changes is discouraged, which seemed to be the only way to reset the size of the sourceview widget if it was set to a fixed width instead of letting it fill the window.
I'll take a look at AdwClampScrollable.
You don't need to monitor window sizes here, no.
if it was set to a fixed width
Right, don't do this. And you have to get rid of that toast overlay too (and of viewport if you added it manually, clamp scrollable replaces that)
The primary notes area, by default, has a fixed with, so I can't just undo that easily without breaking existing behaviour. As such I've implemented an alternate solution that works for Folio.
I'll probably look at changing the default to non-fixed width in a future release though.
I took a quick look at clamp scrollable and don't think it will fit within the app at the moment, but I do have to do a major change at some point as Folio currently uses a lot of deprecated widgets, so I'll look more at it when I get to that.
The primary notes area, by default, has a fixed with
Yes, which results in horizontal scrolling right with default window size. That's a bug, not something to preserve.
Notes' width doesn't seem to adjust to the window:
Is this a bug?