Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor code and add scrollbar #77

Merged
merged 1 commit into from
Feb 15, 2024
Merged

Conversation

hsbasu
Copy link
Collaborator

@hsbasu hsbasu commented Feb 12, 2024

  • Load css from css file instead of hard-coding it as python. Provides better readability in IDEs
  • Remove eol spaces
  • Fix inconsistent tab spacing
  • Remove excutable permission from mousam.in, meson makes it excutable during install for all packaging methods

@amit9838 amit9838 self-requested a review February 12, 2024 15:59
@hsbasu
Copy link
Collaborator Author

hsbasu commented Feb 12, 2024

@amit9838 the snap file is available here.

@amit9838
Copy link
Owner

amit9838 commented Feb 12, 2024

can you also attach .flatpak file

@hsbasu
Copy link
Collaborator Author

hsbasu commented Feb 12, 2024

can you also attach .flatpack file

Flatpak does not generate a file. At least I couldn't find any. You can test using these commands:

flatpak-builder --user --install --force-clean builddir io.github.amit9838.mousam.json
flatpak run io.github.amit9838.mousam

@amit9838
Copy link
Owner

amit9838 commented Feb 12, 2024

Can you try this.
https://unix.stackexchange.com/questions/695934/how-do-i-build-a-flatpak-package-file-from-a-flatpak-manifest

flatpak-builder build/ io.github.amit9838.mousam.json

flatpak build-export export build

flatpak build-bundle export mousam.flatpak io.github.amit9838.mousam.json

Above command will ganarate mousam.flatpak in the current dir (project dir)
can be installed using below command
flatpak install mousam.flatpak

Alternatively you can generate .flatpak package using gnome-builder.
Just follow the sequence

Screenshot 2024-02-12 at 11 16 53 PM

src/mousam.py Outdated Show resolved Hide resolved
@hsbasu
Copy link
Collaborator Author

hsbasu commented Feb 12, 2024

Can you try this. https://unix.stackexchange.com/questions/695934/how-do-i-build-a-flatpak-package-file-from-a-flatpak-manifest

flatpak-builder build/ io.github.amit9838.mousam.json

flatpak build-export export build

flatpak build-bundle export mousam.flatpak io.github.amit9838.mousam.json

Above command will ganarate mousam.flatpak in the current dir (project dir) can be installed using below command flatpak install mousam.flatpak

Alternatively you can generate .flatpak package using gnome-builder. Just follow the sequence
Screenshot 2024-02-12 at 11 16 53 PM

This is a better way. I think I'll create a bash script called test for local testing purpose.

@hsbasu
Copy link
Collaborator Author

hsbasu commented Feb 14, 2024

@amit9838 Reverted back the call for css styles to main.py. Ready for squash and merge.

@amit9838 amit9838 self-requested a review February 14, 2024 14:31
@amit9838
Copy link
Owner

amit9838 commented Feb 14, 2024

can you attach .flatpak file, may be zip it first before uploading

@hsbasu
Copy link
Collaborator Author

hsbasu commented Feb 14, 2024

@amit9838
Copy link
Owner

amit9838 commented Feb 14, 2024

Archive.zip
@hsbasu I'm attaching some ss here, with your codebase, and also by adding scroll_policy with diff screen sizes.
I think scroll is not going to work here.

@hsbasu
Copy link
Collaborator Author

hsbasu commented Feb 14, 2024

Archive.zip @hsbasu I'm attaching some ss here, with your codebase, and also by adding scroll_policy with diff screen sizes. I think scroll is not going to work here.

Sorry I didn't get this. Where do you want me to attach the scroll bar?

@amit9838
Copy link
Owner

amit9838 commented Feb 14, 2024

I mean simply adding the scrollbar is not the solution for this problem. We need to check what else we can do here.

@hsbasu
Copy link
Collaborator Author

hsbasu commented Feb 14, 2024

On low res displays the part of the window is going out of display. It is impossible to view the outliers no matter how you move the window towards top or bottom or left or right. This happens because the cards are not rearranging and/or resizing itself. One temporary fix to view the unviewable parts is to add a scroll bar. For which even though only part of the app is visible, at least by scrolling other unviewable parts will be visible.

Edit: GTK is not known to be a resolution friendly ui framework. For the app to work on any display resolution you might consider flutter. Or rearrange and /or resize the cards and their widths so that full portion of the app is visible in the width direction.

@hsbasu
Copy link
Collaborator Author

hsbasu commented Feb 14, 2024

@amit9838 can I suggest something? The discussions here are getting longer. Would you mind joining in Telegram if you use Telegram? Just ping me with id: hsbasu or the channel mamolinux

@amit9838
Copy link
Owner

On low res displays the part of the window is going out of display. It is impossible to view the outliers no matter how you move the window towards top or bottom or left or right. This happens because the cards are not rearranging and/or resizing itself. One temporary fix to view the unviewable parts is to add a scroll bar. For which even though only part of the app is visible, at least by scrolling other unviewable parts will be visible.

Edit: GTK is not known to be a resolution friendly ui framework. For the app to work on any display resolution you might consider flutter. Or rearrange and /or resize the cards and their widths so that full portion of the app is visible in the width direction.

Ya, Gtk sucks, but now it has improved a lot. So if we are going to build some complex ui, it can be hard to cover all the aspects. So i think it better to foucs on the core part first.
And for the current problem.
if you see number of user using 1366x768 displays are very rare, so for now lets keep it side we'll fix it in future.

@amit9838 amit9838 marked this pull request as draft February 14, 2024 19:17
@hsbasu
Copy link
Collaborator Author

hsbasu commented Feb 14, 2024

On low res displays the part of the window is going out of display. It is impossible to view the outliers no matter how you move the window towards top or bottom or left or right. This happens because the cards are not rearranging and/or resizing itself. One temporary fix to view the unviewable parts is to add a scroll bar. For which even though only part of the app is visible, at least by scrolling other unviewable parts will be visible.
Edit: GTK is not known to be a resolution friendly ui framework. For the app to work on any display resolution you might consider flutter. Or rearrange and /or resize the cards and their widths so that full portion of the app is visible in the width direction.

Ya, Gtk sucks, but now it has improved a lot. So if we are going to build some complex ui, it can be hard to cover all the aspects. So i think it better to foucs on the core part first. And for the current problem. if you see number of user using 1366x768 displays are very rare, so for now lets keep it side we'll fix it in future.

Okay. I'll remove the scroll bar part as well.

@hsbasu
Copy link
Collaborator Author

hsbasu commented Feb 15, 2024

@amit9838 Removed the scroll bar.

@hsbasu hsbasu marked this pull request as ready for review February 15, 2024 06:09
src/mousam.py Outdated Show resolved Hide resolved
- Load css from css file instead of
  hard-coding it as python. Provides
  better readability in IDEs
- Remove eol spaces
- Fix inconsistent tab spacing
- Remove excutable permission from mousam.in,
  meson makes it excutable during install for
  all packaging methods
@amit9838 amit9838 merged commit a38a7e2 into amit9838:master Feb 15, 2024
1 check passed
@hsbasu hsbasu deleted the refactor-code branch February 15, 2024 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants