mirror of
https://github.com/swaywm/sway.git
synced 2025-11-02 09:01:40 -05:00
cleanup in auto layouts
- added L_AUTO_FIRST/LAST instead of using explicit layouts. - when switching between auto layout that don't share the same major axis, invert the width/height of their child views to preserve their relative proportions.
This commit is contained in:
parent
2b0e3c212a
commit
a0aa8d9780
6 changed files with 70 additions and 18 deletions
|
|
@ -44,6 +44,9 @@ enum swayc_layouts {
|
|||
L_AUTO_TOP,
|
||||
L_AUTO_BOTTOM,
|
||||
|
||||
L_AUTO_FIRST = L_AUTO_LEFT,
|
||||
L_AUTO_LAST = L_AUTO_BOTTOM,
|
||||
|
||||
// Keep last
|
||||
L_LAYOUTS,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -76,6 +76,6 @@ void swayc_log(log_importance_t verbosity, swayc_t *cont, const char* format, ..
|
|||
enum swayc_layouts default_layout(swayc_t *output);
|
||||
|
||||
inline bool is_auto_layout(enum swayc_layouts layout) {
|
||||
return (layout >= L_AUTO_LEFT) && (layout <= L_AUTO_BOTTOM);
|
||||
return (layout >= L_AUTO_FIRST) && (layout <= L_AUTO_LAST);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue