fix combobox issue, pad scissor by 1px

This commit is contained in:
2019-08-17 10:20:05 +02:00
parent a8e9e92d96
commit c1bd377ee8
7 changed files with 53 additions and 42 deletions

View File

@@ -284,8 +284,8 @@ public:
// don't capture a reference to this ptr as the object may be destroyed
// by the time the task is executed
template<typename T, typename R = void>
std::future<R> render_task_async(T task, bool unique = false)
template<typename T>
std::future<void> render_task_async(T task, bool unique = false)
{
AppTask pt(task);
auto f = pt.get_future();
@@ -308,8 +308,8 @@ public:
return f;
}
template<typename T, typename R = void>
R render_task(T task)
template<typename T>
void render_task(T task)
{
AppTask pt(task);
auto f = pt.get_future();
@@ -325,7 +325,8 @@ public:
}
render_cv.notify_all();
}
return render_running ? f.get() : R();
if (render_running)
f.get();
}
void render_sync()
@@ -354,8 +355,8 @@ public:
// don't capture a reference to this ptr as the object may be destroyed
// by the time the task is executed
template<typename T, typename R = void>
std::future<R> ui_task_async(T task, bool unique = false)
template<typename T>
std::future<void> ui_task_async(T task, bool unique = false)
{
AppTask pt(task);
auto f = pt.get_future();
@@ -378,8 +379,8 @@ public:
return f;
}
template<typename T, typename R = void>
R ui_task(T task)
template<typename T>
void ui_task(T task)
{
AppTask pt(task);
auto f = pt.get_future();
@@ -395,7 +396,9 @@ public:
}
ui_cv.notify_all();
}
return ui_running ? f.get(), redraw = true : R();
if (ui_running)
f.get();
redraw = true;
}
void ui_sync()