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

maximize windows #22

Open
guoyuejiang opened this issue Dec 14, 2024 · 2 comments
Open

maximize windows #22

guoyuejiang opened this issue Dec 14, 2024 · 2 comments

Comments

@guoyuejiang
Copy link

guoyuejiang commented Dec 14, 2024

when i try to maximize the window, the window will stop about 1 frame like this img show
image

after that, it normally show like this
image

how to fix this?

env:
windows 10 21H2
python 3.8.10
PySide6 6.6.3.1

@guoyuejiang
Copy link
Author

Fixed, I change the gui.widget.py_title_bar, function 'maximize_restore', seems before change the window to showMaximized, then setContentsMargins to 0000.

   def maximize_restore(self, e = None):
        # CHECK EVENT
        if self._parent.isMaximized():
            self._parent.ui.central_widget_layout.setContentsMargins(10,10,10,10)
            self._parent.ui.window.set_stylesheet(border_radius = 10, border_size = 2) 
            self.maximize_restore_button.set_icon(Functions.set_svg_icon("icon_maximize.svg"))

            self._parent.showNormal()
        else:
            self._parent.ui.central_widget_layout.setContentsMargins(0,0,0,0)
            self._parent.ui.window.set_stylesheet(border_radius = 0, border_size = 0)
            self.maximize_restore_button.set_icon(Functions.set_svg_icon("icon_restore.svg"))

            self._parent.showMaximized()

@guoyuejiang
Copy link
Author

not solved when use Shortcut keys "win + up"

@guoyuejiang guoyuejiang reopened this Dec 14, 2024
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

No branches or pull requests

1 participant