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

Add manual button's layout manager #113

Open
mks-h opened this issue Sep 13, 2021 · 3 comments
Open

Add manual button's layout manager #113

mks-h opened this issue Sep 13, 2021 · 3 comments

Comments

@mks-h
Copy link

mks-h commented Sep 13, 2021

The problem is predefined layouts don't provide all possible options. I think predefined layouts should be "Windows", "MacOS", "Ubuntu", "Reversed", and one more super-popular layout. And everything else should be constructed manually through some layout manager.

@ryonakano
Copy link
Member

Yeah I've been thinking the current design (combobox) is not visually good. Maybe throw that design out and use DnD instead?

@ryonakano
Copy link
Member

ryonakano commented Sep 27, 2021

Just a small mockup (not fully working tho):

Peek.2021-09-27.21-39.mp4

@sempasha
Copy link

sempasha commented Mar 26, 2022

Let's imagine each button position is marked with number

[ 1 2 3  window title 4 5 6 ]

When we have only three possible buttons (close , maximize and minimize ), there are only nine positional combinations for buttons placement

[ 1      window title        ]
[        window title      6 ]
[ 1 2    window title        ]
[ 1      window title      6 ]
[        window title    5 6 ]
[ 1 2 3  window title        ]
[ 1 2    window title      6 ]
[ 1      window title    5 6 ]
[        window title  4 5 6 ]

Combinations with spaces between buttons, or with spaces between button and titlebar edge aren't useful, e.g. layout below seems to be too odd. It has nothing at position 2 (between 1 and 3) and nothing at position 6 (between 5 and right edge)

[ 1   3  window title    5   ]

Let's assume close button is required for any layout, and it must be placed at the titlebar edge (position 1 or 6).

Then we have:

  1. 2 layouts for single button:
    [ ⨯      window title        ]  # Close Only Left
    [        window title      ⨯ ]  # Close Only Right
    
  2. 8 layouts for two buttons:
    [ ⨯ ⤢    window title        ]
    [ ⨯      window title      ⤢ ]  # Elementary
    [ ⤢      window title      ⨯ ]  # Elementary Reversed
    [        window title    ⤢ ⨯ ]
    [ ⨯ ⤓    window title        ]
    [ ⨯      window title      ⤓ ]  # Replace Maximize to Minimize
    [ ⤓      window title      ⨯ ] 
    [        window title    ⤓ ⨯ ]
    
  3. 12 layouts for three buttons:
    [ ⨯ ⤢ ⤓  window title        ]  # Ubuntu
    [ ⨯ ⤓ ⤢  window title        ]  # MacOS
    [ ⨯ ⤢    window title      ⤓ ]
    [ ⨯ ⤓    window title      ⤢ ]  # Add Minimize Left
    [ ⨯      window title    ⤢ ⤓ ]
    [ ⨯      window title    ⤓ ⤢ ]  # Add Minimize Right
    [ ⤓ ⤢    window title      ⨯ ]
    [ ⤢ ⤓    window title      ⨯ ]
    [ ⤓      window title    ⤢ ⨯ ]
    [ ⤢      window title    ⤓ ⨯ ]
    [        window title  ⤓ ⤢ ⨯ ]  # Windows
    [        window title  ⤢ ⤓ ⨯ ]
    

There are 22 possible layouts in total.
Seems like selecting target layout from options still possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants