Scale panel elements (issue #656)

This commit is contained in:
o9000
2018-01-17 05:19:32 +00:00
parent 12f04e3055
commit c7b23ee94a
18 changed files with 183 additions and 133 deletions

View File

@@ -313,10 +313,10 @@ void sort_monitors()
int compute_dpi(XRRCrtcInfo *crtc, XRROutputInfo *output)
{
int width = output->mm_width;
int height = output->mm_height;
int x_res = crtc->width;
int y_res = crtc->height;
double width = output->mm_width;
double height = output->mm_height;
double x_res = crtc->width;
double y_res = crtc->height;
if (width > 0 && height > 0) {
int dpi_x = x_res / width * 25.4;
@@ -364,7 +364,7 @@ void get_monitors()
if (dpi)
server.monitors[i_monitor].dpi = dpi;
fprintf(stderr,
"tint2: xRandr: Linking output %s with crtc %d, resolution %dx%d, DPI %d\n",
BLUE "tint2: xRandr: Linking output %s with crtc %d, resolution %dx%d, DPI %d" RESET "\n",
output_info->name,
i,
server.monitors[i_monitor].width,