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

Network Settings windows size #8360

Closed
0lzi opened this issue Feb 1, 2019 · 12 comments
Closed

Network Settings windows size #8360

0lzi opened this issue Feb 1, 2019 · 12 comments

Comments

@0lzi
Copy link

0lzi commented Feb 1, 2019

 * Cinnamon version (Cinnamon 4.0.9)
 * Distribution - (Mint 19.1 )
 * Graphics hardware Nvidia GTX 960 driver used 4.15.27
 * 64 bit

[xsession-errors.txt](https://github.com/linuxmint/Cinnamon/files/2821162/xsession-errors.txt)
**Issue**
When selecting Network settings from panel

[image](https://user-images.githubusercontent.com/4409144/52117317-58ee0380-260b-11e9-8cbb-e1f4d2481dbd.png)

The network settings window is not sized properly to fit all the information as show below.

[image](https://user-images.githubusercontent.com/4409144/52117370-74590e80-260b-11e9-9ed5-764e4885609c.png)

Also after resizing and closing the same window opens rather than the previously resized window.


**Steps to reproduce**
1. Click network icon from panel
2. Click network settings


**Expected behaviour**
1. Click network icon from panel
2. Click network setting
3. Network settings windows displays all the information without needing to resize.
4. If the window is resized upon closing and re-opening Network settings the same size window is displayed from previous state


**Other information**
not sure if you would tag as bug or feature request 
@kacperpaczos
Copy link
Contributor

I confirm this bug:
obraz

@ManIVIctorious
Copy link

Affects me too on arch Linux

@ghost
Copy link

ghost commented Feb 19, 2019

No one will fix this problem, so here's a solution for you:
Open /usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py
Replace:
self.window.resize(WIN_WIDTH, use_height)
To:
self.window.resize(WIN_WIDTH, 500)
Fixes on any resolution

@smurphos
Copy link
Contributor

@morteryler - that's a fudge rather than a fix - and causes other settings module whose natural height is
not 500px to open at a fixed height.

@0lzi
Copy link
Author

0lzi commented Feb 21, 2019

No one will fix this problem, so here's a solution for you:

Im no programmer but there must be something that decides that this particular settings window opens that size. so must be a way to resize it and to save that state.

@claudiux
Copy link
Member

claudiux commented Feb 23, 2019

(Just a temporary patch.) Replace in /usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py the maybe_resize function by this one:


    def maybe_resize(self, sidePage):
        m, n = self.content_box.get_preferred_size()

        # Resize vertically depending on the height requested by the module
        use_height = WIN_HEIGHT
        total_height = n.height + self.bar_heights + WIN_H_PADDING
        if not sidePage.size:
            # No height requested, resize vertically if the module is taller than the window
            if total_height > WIN_HEIGHT:
                use_height = total_height
        elif sidePage.size > 0:
            # Height hardcoded by the module
            use_height = sidePage.size + self.bar_heights + WIN_H_PADDING
        elif sidePage.size == -1:
            # Module requested the window to fit it (i.e. shrink the window if necessary)
            use_height = total_height
            if len(sys.argv) > 1 and sys.argv[1] == "network":
                use_height = 350

        self.window.resize(WIN_WIDTH, use_height)

@smurphos
Copy link
Contributor

@claudiux that works great without impacting on other modules window sizes but the height for the network window does need to be 500 to avoid launching with unnecessary scroll bars.

@claudiux
Copy link
Member

claudiux commented Feb 28, 2019

@smurphos just change use_height = 350 by use_height = 500 if you want. But on my computer, scroll bars are still present.

@akred
Copy link

akred commented Jun 6, 2019

Hi everyone,

Do you know if a fix is planned for a next version ?

Thanks

@mtwebster
Copy link
Member

This has been fixed for a while, it will be in the next version: linuxmint/cinnamon-control-center@18bd8a1

Sorry I never saw this bug to tag it.

@akred
Copy link

akred commented Jun 6, 2019

I guess we cannot fix it in the current version (except with the workaround above) ?
I tried to find the "network.ui" file, but I think it's for the next version :)

Thanks for the update

@qeala
Copy link

qeala commented Jun 27, 2019

I used this:

    if self.window.get_title() == 'Network':
        use_height = 500

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

8 participants