mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-04-06 07:15:53 -04:00
改进scoller默认宽度为动态宽度
This commit is contained in:
parent
2f8a6285b2
commit
cec8d2d69e
3 changed files with 57 additions and 17 deletions
14
maomao.c
14
maomao.c
|
|
@ -5339,26 +5339,26 @@ void overview_restore(Client *c, const Arg *arg) {
|
|||
void switch_proportion_preset(const Arg *arg) {
|
||||
float target_proportion = 0;
|
||||
|
||||
if (LENGTH(scroller_proportion_preset) == 0) {
|
||||
if (config.scroller_proportion_preset_count == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (selmon->sel) {
|
||||
|
||||
for (int i = 0; i < LENGTH(scroller_proportion_preset); i++) {
|
||||
if (scroller_proportion_preset[i] == selmon->sel->scroller_proportion) {
|
||||
if (i == LENGTH(scroller_proportion_preset) - 1) {
|
||||
target_proportion = scroller_proportion_preset[0];
|
||||
for (int i = 0; i < config.scroller_proportion_preset_count; i++) {
|
||||
if (config.scroller_proportion_preset[i] == selmon->sel->scroller_proportion) {
|
||||
if (i == config.scroller_proportion_preset_count - 1) {
|
||||
target_proportion = config.scroller_proportion_preset[0];
|
||||
break;
|
||||
} else {
|
||||
target_proportion = scroller_proportion_preset[i + 1];
|
||||
target_proportion = config.scroller_proportion_preset[i + 1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (target_proportion == 0) {
|
||||
target_proportion = scroller_proportion_preset[0];
|
||||
target_proportion = config.scroller_proportion_preset[0];
|
||||
}
|
||||
|
||||
unsigned int max_client_width =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue