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

beautiful.titlebar_*_button_normal inconsistent behaviour. #3506

Open
Crylia opened this issue Nov 14, 2021 · 4 comments
Open

beautiful.titlebar_*_button_normal inconsistent behaviour. #3506

Crylia opened this issue Nov 14, 2021 · 4 comments

Comments

@Crylia
Copy link
Contributor

Crylia commented Nov 14, 2021

Output of awesome --version:

awesome v4.3-1284-g50b9b104

How to reproduce the issue:

Creating a custom titlebar and themeing:

beautiful.titlebar_maximized_button_normal

Will not be enought.
Adding

beautiful.titlebar_maximized_button_active
beautiful.titlebar_maximized_button_inactive

will be needed for it to work and display.

This is inconsistent with other titlebar_*_button since they only require _normal to get displayed properly

Actual result:
Setting
beautiful.titlebar_maximized_button_normal
alone doesnt work

Expected result:

Setting
beautiful.titlebar_maximized_button_normal
displays the button at all times without having to set

beautiful.titlebar_maximized_button_active
beautiful.titlebar_maximized_button_inactive
@sclu1034
Copy link
Contributor

sclu1034 commented Nov 14, 2021

Upon closer inspection, it's technically minizebutton that's inconsistent. It should display a state, like floatingbutton or maximizedbutton, but provides a NOOP for the selector function (function() return "" end). There is no state for a closebutton, so it doesn't have _active/_inactive.

Either way, the difference in theme variables between toggle buttons and "non-toggle" buttons can be confusing, and it would make sense to extend the documentation to explain how these theme variables work, i.e. how each section of the name is determined. Right now, there's just a multiple pages long list of all possible permutations.

And technically, even beautiful.titlebar_maximized_button_normal is not the "at all times" value, since the _normal suffix may be replaced with _focus at certain times.
So we should probably also add a new, actual "at all times" fallback, such as beautiful.titlebar_maximized_button.

@Aire-One
Copy link
Member

In this regard : why do we have 3 states normal, active and inactive?

I think titlebar buttons are toggles, hence they should have only 2 possible states : active and inactive.

@Crylia
Copy link
Contributor Author

Crylia commented Nov 14, 2021

It might for when you have a universal title bar that sets the maximize button inactive if the window cannot be maximized e.g. dialog windows

@sclu1034
Copy link
Contributor

sclu1034 commented Nov 14, 2021

In this regard : why do we have 3 states normal, active and inactive?

It's 4 states, not 3 (technically even more if you also take the other variables into account). _normal/_focus (connected to c.active) are separate from _active/_inactive (connected to c.maximized).
beautiful.titlebar_maximized_button_normal_active is a valid theme variable.

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

3 participants