reduces rounding of icons in grid based menus (15 -> 5).
This commit is contained in:
@@ -236,7 +236,7 @@ void DrawIcon(NVGcontext* vg, const LazyImage& l, const LazyImage& d, float x, f
|
|||||||
bool crop = false;
|
bool crop = false;
|
||||||
if (iw < w || ih < h) {
|
if (iw < w || ih < h) {
|
||||||
rounded_image = false;
|
rounded_image = false;
|
||||||
gfx::drawRect(vg, x, y, w, h, nvgRGB(i.first_pixel[0], i.first_pixel[1], i.first_pixel[2]), rounded ? 15 : 0);
|
gfx::drawRect(vg, x, y, w, h, nvgRGB(i.first_pixel[0], i.first_pixel[1], i.first_pixel[2]), rounded ? 5 : 0);
|
||||||
}
|
}
|
||||||
if (iw > w || ih > h) {
|
if (iw > w || ih > h) {
|
||||||
crop = true;
|
crop = true;
|
||||||
@@ -244,7 +244,7 @@ void DrawIcon(NVGcontext* vg, const LazyImage& l, const LazyImage& d, float x, f
|
|||||||
nvgIntersectScissor(vg, x, y, w, h);
|
nvgIntersectScissor(vg, x, y, w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::drawImage(vg, ix, iy, iw, ih, i.image, rounded_image ? 15 : 0);
|
gfx::drawImage(vg, ix, iy, iw, ih, i.image, rounded_image ? 5 : 0);
|
||||||
if (crop) {
|
if (crop) {
|
||||||
nvgRestore(vg);
|
nvgRestore(vg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ void Menu::Draw(NVGcontext* vg, Theme* theme) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const float image_size = 115;
|
const float image_size = 115;
|
||||||
gfx::drawImage(vg, x + 20, y + 20, image_size, image_size, e.image ? e.image : App::GetDefaultImage(), 15);
|
gfx::drawImage(vg, x + 20, y + 20, image_size, image_size, e.image ? e.image : App::GetDefaultImage(), 5);
|
||||||
|
|
||||||
const auto text_off = 148;
|
const auto text_off = 148;
|
||||||
const auto text_x = x + text_off;
|
const auto text_x = x + text_off;
|
||||||
|
|||||||
@@ -605,7 +605,7 @@ void Menu::Draw(NVGcontext* vg, Theme* theme) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::drawImage(vg, x + xoff, y, 320, 180, image.image ? image.image : App::GetDefaultImage(), 15);
|
gfx::drawImage(vg, x + xoff, y, 320, 180, image.image ? image.image : App::GetDefaultImage(), 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto text_x = x + xoff;
|
const auto text_x = x + xoff;
|
||||||
|
|||||||
Reference in New Issue
Block a user