Skip to content

Commit

Permalink
pcmockup: fix slight misalignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Helco committed Nov 27, 2018
1 parent 3236c7b commit 5054ffc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pcmockup/imagewindow.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,19 @@ void imageWindow_beforeUpdate(Window* window, void* userdata)

void imageWindow_contentUpdate(Window* window, void* userdata)
{
const ImageWindow* me = (const ImageWindow*)userdata;
ImageWindow* me = (ImageWindow*)userdata;
const GSize windowSize = window_getBounds(window).size;
const ImVec2
zero = { 0, 0 },
one = { 1 + FLT_EPSILON, 1 + FLT_EPSILON },
size = { (float)windowSize.w, (float)windowSize.h };
one = { 1, 1 },
size = { (float)windowSize.w, (float)windowSize.h - me->toolbarHeight };
const ImVec4
tintColor = { 1, 1, 1, 1 },
borderColor = { 0, 0, 0, 0 };
ImVec2 toolbarSize;

igGetItemRectSize_nonUDT(&toolbarSize);
me->toolbarHeight = toolbarSize.y;
igImageButton((ImTextureID)(intptr_t)me->textureID, size, zero, one, 0, borderColor, tintColor);
igPopStyleVar(1);
}
Expand Down

0 comments on commit 5054ffc

Please sign in to comment.