You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Compose View overflowing screen on PinePhone under Manjaro and PostmarketOSΒ #212
Describe the bug
When I open the compose view it overflows off both sides of the screen on my PinePhone. It happens under PostmarketOS (Phosh) and Manjaro (also Phosh).
To Reproduce
Open Cawbird
Click button to open compose view
Expected behavior
The view shouldn't overflow off the screen.
I think we can do something quite quickly to just say "initial width is X or screen width, whichever is smaller". Does the settings dialog and other windows have the same problem?
Presumably the buttons are small because the dialog is being scaled? I don't know what that means for when we make it fit on the screen width. Will it not expand the height?
If Cawbird sets a size >360px, won't it either overflow the 'desktop' or be scaled? Or do all the various Linux-on-phone OSes ignore default sizes and resize if possible rather than scaling?
PureOS on the Librem 5 is the same as PureOS on a laptop, it's just the
screen is smaller. So if you can resize the Cawbird window in question so
that the width is less than 360px you can simulate how it would behave. I
suspect on the desktop the window won't allow you to resize the width that
small.
On Wed, Dec 16, 2020 at 11:25:40AM -0800, IBBoard wrote:
If Cawbird sets a size >360px, won't it either overflow the 'desktop' or be scaled? Or do all the various Linux-on-phone OSes ignore default sizes and resize if possible rather than scaling?
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#212 (comment)
Yeah, that's what I did for the previous changes to make the main window fit. But then @dos1 said I just need to make it resizeable, which I wanted to check because we do this.set_default_size (DEFAULT_WIDTH, (int)(DEFAULT_WIDTH / 2.5)); where DEFAULT_WIDTH = 450.
Does your framework use the default width to define the minimum width? I
know GTK tries to allow widgets to flow where they fit whenever possible
but if a minimum width is set it won't violate it. If default=minimum that
might explain what you are seeing if the window can't resize smaller than
450px.
On Wed, Dec 16, 2020 at 12:30:23PM -0800, IBBoard wrote:
Yeah, that's what I did for the previous changes to make the main window fit. But then @dos1 said I just need to make it resizeable, which I wanted to check because we do `this.set_default_size (DEFAULT_WIDTH, (int)(DEFAULT_WIDTH / 2.5));` where `DEFAULT_WIDTH = 450`.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#212 (comment)
Not a clue what GTK does. It's old code that Baedert wrote and I've not changed it. I don't think it sets a minimum width, but it should set an initial width. And it's an initial that's bigger than the screen width. It could be widgets in the container that won't allow a smaller minimum.
If Cawbird sets a size >360px, won't it either overflow the 'desktop' or be scaled?
Default size != minimal size. You're free to set the default size however you like, but it should be possible for the window to fit into the screen by resizing it manually - then the compositor will do the rest. Just run cawbird on your desktop and try to resize the compose window down to 360px wide - you won't be able to, and that's the issue here. On cawbird side, once it's possible to shrink it down you'll be all set (there's one thing to fix in phoc as well to make it actually work in all cases, but that's on the compositor side and not your concern ;)).
Don't be distracted by any scaling, it's a non-default convenience feature for legacy apps.
It could be widgets in the container that won't allow a smaller minimum.
Yep, it does seem to be the case - and setting a different GTK theme makes the minimal size different for me, which hints at it even more.
No, but default size is the size that the window gets created at. Unless anyone can tell me clearly "If you set a default size that is larger than the width of the phone screen then the phone will ignore that and use a narrower width (down to the minimum size)" then I'm going to have to change the default size behaviour as well as making it have a smaller minimum size. That's not something that I can test by shrinking the window down to 360px wide.
OK then - If you set a default size that is larger than the width of the phone screen then the phone will ignore that and use a narrower width (down to the minimum size) :D
(and even if this may not be true in every case at the moment in phoc, I'll make it true soon anyway - I am phoc maintainer ;))
It looks like the thing limiting the minimum size is the emoji picker. Which is fun given that a) phones don't need the emoji picker and b) I've got #243!
(Also, this is the dialog that has "Insert Emoji" twice because Baedert adds it manually with the same action as the emoji button, but Gnome now has it because emoji support became mainstream!)
Can you test Master? Does that fix it? I've assumed that anything below our "responsive" size (440px) is too small to bother showing the emoji picker on, so it should be missing in portrait but available in landscape.
(I tested it by temporarily setting the limit to 3000 and it seems to work)
[Edit] Also just put in another fix so that Cawbird loads in "responsive" layout when on small screens. We were fine when resizing, but while testing this I noticed that we didn't start in responsive layout when it opened up small.
Activity
m0jek commentedon Nov 17, 2020
I'm using Cawbrid on Arch ARM on pinephone
I set "
scale-to-fit cawbird", and that appears to help. I am also using the most recent available in the Arch repo.I don't have the issue of overflow now, however at the moment fonts and buttons are a bit small. Still need to look at that.
IBBoard commentedon Nov 17, 2020
I think we can do something quite quickly to just say "initial width is X or screen width, whichever is smaller". Does the settings dialog and other windows have the same problem?
Presumably the buttons are small because the dialog is being scaled? I don't know what that means for when we make it fit on the screen width. Will it not expand the height?
kylerankin commentedon Dec 9, 2020
The main timeline window seems fine but the compose window and the settings window both overflow the screen size.
This link describes the phone screen design constraints to test against for the Librem 5 which should also be a reasonable guideline for similar-sized screens: https://developer.puri.sm/Librem5/Apps/Guides/Design/Constraints.html
dos1 commentedon Dec 15, 2020
@IBBoard All you need to do it to make sure that the compose window can be resized down to 360px width (it can't at the moment).
IBBoard commentedon Dec 16, 2020
If Cawbird sets a size >360px, won't it either overflow the 'desktop' or be scaled? Or do all the various Linux-on-phone OSes ignore default sizes and resize if possible rather than scaling?
kylerankin commentedon Dec 16, 2020
IBBoard commentedon Dec 16, 2020
Yeah, that's what I did for the previous changes to make the main window fit. But then @dos1 said I just need to make it resizeable, which I wanted to check because we do
this.set_default_size (DEFAULT_WIDTH, (int)(DEFAULT_WIDTH / 2.5));whereDEFAULT_WIDTH = 450.kylerankin commentedon Dec 16, 2020
IBBoard commentedon Dec 16, 2020
Not a clue what GTK does. It's old code that Baedert wrote and I've not changed it. I don't think it sets a minimum width, but it should set an initial width. And it's an initial that's bigger than the screen width. It could be widgets in the container that won't allow a smaller minimum.
dos1 commentedon Dec 16, 2020
Default size != minimal size. You're free to set the default size however you like, but it should be possible for the window to fit into the screen by resizing it manually - then the compositor will do the rest. Just run cawbird on your desktop and try to resize the compose window down to 360px wide - you won't be able to, and that's the issue here. On cawbird side, once it's possible to shrink it down you'll be all set (there's one thing to fix in phoc as well to make it actually work in all cases, but that's on the compositor side and not your concern ;)).
Don't be distracted by any scaling, it's a non-default convenience feature for legacy apps.
Yep, it does seem to be the case - and setting a different GTK theme makes the minimal size different for me, which hints at it even more.
IBBoard commentedon Dec 17, 2020
No, but default size is the size that the window gets created at. Unless anyone can tell me clearly "If you set a default size that is larger than the width of the phone screen then the phone will ignore that and use a narrower width (down to the minimum size)" then I'm going to have to change the default size behaviour as well as making it have a smaller minimum size. That's not something that I can test by shrinking the window down to 360px wide.
dos1 commentedon Dec 17, 2020
OK then - If you set a default size that is larger than the width of the phone screen then the phone will ignore that and use a narrower width (down to the minimum size) :D
(and even if this may not be true in every case at the moment in phoc, I'll make it true soon anyway - I am phoc maintainer ;))
IBBoard commentedon Dec 17, 2020
Thanks for clarifying. It sounded like you were suggesting that might be the case, but I wasn't certain.
IBBoard commentedon Dec 20, 2020
It looks like the thing limiting the minimum size is the emoji picker. Which is fun given that a) phones don't need the emoji picker and b) I've got #243!
(Also, this is the dialog that has "Insert Emoji" twice because Baedert adds it manually with the same action as the emoji button, but Gnome now has it because emoji support became mainstream!)
Re #212: Hide emoji chooser on small screens
IBBoard commentedon Dec 20, 2020
Can you test Master? Does that fix it? I've assumed that anything below our "responsive" size (440px) is too small to bother showing the emoji picker on, so it should be missing in portrait but available in landscape.
(I tested it by temporarily setting the limit to 3000 and it seems to work)
[Edit] Also just put in another fix so that Cawbird loads in "responsive" layout when on small screens. We were fine when resizing, but while testing this I noticed that we didn't start in responsive layout when it opened up small.
Make sure we start in responsive mode if required
dos1 commentedon Dec 26, 2020
Yup, seems to fit fine on master!