mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-13 13:29:55 -05:00
feat: add scroller_prefer_center option
This commit is contained in:
parent
6710dbd82a
commit
3e47d6ed2c
4 changed files with 73 additions and 52 deletions
6
maomao.c
6
maomao.c
|
|
@ -5744,10 +5744,10 @@ void scroller(Monitor *m, unsigned int gappo, unsigned int gappi) {
|
|||
target_geom.y = m->w.y + (m->w.height - target_geom.height) / 2;
|
||||
|
||||
if (need_scroller) {
|
||||
if (scoller_focus_center || m->prevsel == NULL ||
|
||||
(m->prevsel->scroller_proportion * max_client_width) +
|
||||
if (scroller_focus_center || m->prevsel == NULL ||
|
||||
((m->prevsel->scroller_proportion * max_client_width) +
|
||||
(root_client->scroller_proportion * max_client_width) >
|
||||
m->w.width - 2 * scroller_structs - gappih) {
|
||||
m->w.width - 2 * scroller_structs - gappih && scroller_prefer_center)) {
|
||||
target_geom.x = m->w.x + (m->w.width - target_geom.width) / 2;
|
||||
} else {
|
||||
target_geom.x =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue