truncate DPI to an integer before multiplying (Thanks eeemsi)
This fixes i3bar workspace button rendering on non-DPI screens (oldschool!)
This commit is contained in:
parent
350e2c5f55
commit
3760a48abe
@ -10,7 +10,7 @@ extern xcb_screen_t *root_screen;
|
||||
*
|
||||
*/
|
||||
int logical_px(const int logical) {
|
||||
const double dpi = (double)root_screen->height_in_pixels * 25.4 /
|
||||
(double)root_screen->height_in_millimeters;
|
||||
const int dpi = (double)root_screen->height_in_pixels * 25.4 /
|
||||
(double)root_screen->height_in_millimeters;
|
||||
return ceil((dpi / 96.0) * logical);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user