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

Make window remember dimensions #2807

Merged
merged 2 commits into from
Mar 22, 2023
Merged

Make window remember dimensions #2807

merged 2 commits into from
Mar 22, 2023

Conversation

RozeFound
Copy link
Contributor

@RozeFound RozeFound commented Mar 19, 2023

Description

Main window will now remain the same size as it was before closing.
There already was fields in gschema but unused for some reason

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Tested by @TheEvilSkeleton

@TheEvilSkeleton
Copy link
Contributor

Is there a prior discussion to this? I don't remember ever seeing a discussion

@jannuary
Copy link
Contributor

jannuary commented Mar 21, 2023

Lest I'm mistaken, this is pretty common practice in other apps - I'm fine with this being merged.

Although, HIG only explicitly says about apps that restore a specific view:

Apps which restore a particular view or content item when they are restarted should also restore their previous window size.

@github-actions
Copy link
Contributor

Pylint result on modfied files:
************* Module bottles.frontend.windows.main_window
bottles/frontend/windows/main_window.py:54:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/main_window.py:56:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/main_window.py:172:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/main_window.py:200:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/main_window.py:200:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/main_window.py:24:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/windows/main_window.py:36:0: W0401: Wildcard import bottles.frontend.const (wildcard-import)
bottles/frontend/windows/main_window.py:38:0: W0401: Wildcard import bottles.frontend.params (wildcard-import)
bottles/frontend/windows/main_window.py:125:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/windows/main_window.py:152:35: W0613: Unused argument 'status' (unused-argument)
bottles/frontend/windows/main_window.py:169:41: W0613: Unused argument 'error' (unused-argument)
bottles/frontend/windows/main_window.py:257:32: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:261:32: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:265:32: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:272:28: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:276:29: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:279:33: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:282:30: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:282:44: W0613: Unused argument 'view' (unused-argument)
bottles/frontend/windows/main_window.py:297:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/frontend/windows/main_window.py:318:12: C0103: Variable name "w" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/windows/main_window.py:321:4: R0913: Too many arguments (6/5) (too-many-arguments)
bottles/frontend/windows/main_window.py:335:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/windows/main_window.py:351:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/windows/main_window.py:358:8: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/windows/main_window.py:361:17: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:177:12: W0201: Attribute 'page_details' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/main_window.py:178:12: W0201: Attribute 'page_list' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/main_window.py:179:12: W0201: Attribute 'page_importer' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/main_window.py:180:12: W0201: Attribute 'page_library' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/main_window.py:55:0: R0904: Too many public methods (25/20) (too-many-public-methods)
bottles/frontend/windows/main_window.py:38:0: W0614: Unused import(s) APP_NAME, APP_NAME_LOWER, APP_VERSION, APP_ICON, ANIM_DURATION, EXECUTABLE_EXTS and DOC_URL from wildcard import of bottles.frontend.params (unused-wildcard-import)

@RozeFound
Copy link
Contributor Author

RozeFound commented Mar 21, 2023

Is there a prior discussion to this? I don't remember ever seeing a discussion

I don't know, it just bothers me a lot, especially with library view, coz it looks horrible with default size to me.

image

I often resize it to fit 1 row 3 tiles perfectly, but window size always resets on launch ¯\_(ツ)_/¯
Maybe there is a better solution for my issue, like dynamic LibraryEntry size, but I'll go for the easy one at least for now

@TheEvilSkeleton
Copy link
Contributor

Yeah doing this should be fine. Although I made a suggestion last year about centering the content and locking to 3 columns #2302 (review)

bottles/frontend/ui/window.blp Outdated Show resolved Hide resolved
bottles/frontend/ui/window.blp Outdated Show resolved Hide resolved
Co-authored-by: Hari Rana <theevilskeleton@riseup.net>
@TheEvilSkeleton
Copy link
Contributor

Thanks! For future reference, please open an issue before submitting an MR. Sometimes, we might have to close it if we don't like the feature/change, which would become a waste of time for the submitter.

@TheEvilSkeleton TheEvilSkeleton merged commit 0485641 into bottlesdevs:main Mar 22, 2023
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.

None yet

3 participants