fix(tray): Vertically center in inner bar area

The tray should be vertically centered in the inner area of the bar.
Unequal top and bottom borders should not affect the alignment relative
to other text.

Fixes #2950
This commit is contained in:
patrick96 2023-04-29 14:30:23 +02:00 committed by Patrick Ziegler
parent 7bc673b8f2
commit 61f0e9dd5d

View File

@ -459,10 +459,10 @@ unsigned manager::calculate_w() const {
}
/**
* Calculate y position of client window
* Calculate y position of client window to vertically center it in the inner area of the bar.
*/
int manager::calculate_client_y() {
return (m_bar_opts.outer_area(true).height - m_opts.client_size.h) / 2;
return m_bar_opts.inner_area(false).y + (m_bar_opts.inner_area(false).height - m_opts.client_size.h) / 2;
}
/**