Skip to content

Commit

Permalink
[Shortcut Guide] UI tweaks (#14215)
Browse files Browse the repository at this point in the history
* New SVGs

* Updated tooltips

* Tweaks

* Portrait mode updates

Co-authored-by: Laute <Niels.Laute@philips.com>
  • Loading branch information
niels9001 and Laute committed Nov 5, 2021
1 parent 1596293 commit 019c05c
Show file tree
Hide file tree
Showing 14 changed files with 606 additions and 674 deletions.
37 changes: 23 additions & 14 deletions src/modules/ShortcutGuide/ShortcutGuide/overlay_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,27 +463,36 @@ void D2DOverlayWindow::init()
{
colors.update();
landscape.load(L"svgs\\overlay.svg", d2d_dc.get())
.find_thumbnail(L"path-1")
.find_window_group(L"Group-1")
.recolor(0x000000, colors.start_color_menu);
.find_thumbnail(L"monitorRect")
.find_window_group(L"WindowControlsGroup")
.recolor(0x2582FB, colors.start_color_menu);
portrait.load(L"svgs\\overlay_portrait.svg", d2d_dc.get())
.find_thumbnail(L"path-1")
.find_window_group(L"Group-1")
.recolor(0x000000, colors.start_color_menu);
.find_thumbnail(L"monitorRect")
.find_window_group(L"WindowControlsGroup")
.recolor(0x2582FB, colors.start_color_menu);
no_active.load(L"svgs\\no_active_window.svg", d2d_dc.get());
arrows.resize(10);
for (unsigned i = 0; i < arrows.size(); ++i)
{
arrows[i].load(L"svgs\\" + std::to_wstring((i + 1) % 10) + L".svg", d2d_dc.get()).recolor(0x000000, colors.start_color_menu);
arrows[i].load(L"svgs\\" + std::to_wstring((i + 1) % 10) + L".svg", d2d_dc.get()).recolor(0x2582FB, colors.start_color_menu);
}
light_mode = (theme_setting == Light) || (theme_setting == System && colors.light_mode);
if (!light_mode)
if (light_mode)
{
landscape.recolor(0x222222, 0xDDDDDD);
portrait.recolor(0x222222, 0xDDDDDD);
landscape.recolor(0x2E17FC, 0x000000);
portrait.recolor(0x2E17FC, 0x000000);
for (auto& arrow : arrows)
{
arrow.recolor(0x222222, 0xDDDDDD);
arrow.recolor(0x222222, 0x000000);
}
}
else
{
landscape.recolor(0x2E17FC, 0xFFFFFF);
portrait.recolor(0x2E17FC, 0xFFFFFF);
for (auto& arrow : arrows)
{
arrow.recolor(0x222222, 0xFFFFFF);
}
}
}
Expand All @@ -496,13 +505,13 @@ void D2DOverlayWindow::resize()
{ // portrait is broke right now
use_overlay = &landscape;
no_active_scale = 0.3f;
font = 15.0f;
font = 12.0f;
}
else
{
use_overlay = &portrait;
no_active_scale = 0.5f;
font = 16.0f;
font = 13.0f;
}
use_overlay->resize(0, 0, window_width, window_height, 0.8f);
auto thumb_no_active_rect = use_overlay->get_thumbnail_rect_and_scale(0, 0, no_active.width(), no_active.height(), no_active_scale).rect;
Expand Down Expand Up @@ -718,7 +727,7 @@ void D2DOverlayWindow::render(ID2D1DeviceContext5* d2d_dc)
// render the monitors
if (render_monitors)
{
brushColor = D2D1::ColorF(colors.desktop_fill_color, miniature_shown ? current_anim_value : current_anim_value * 0.3f);
brushColor = D2D1::ColorF(colors.start_color_menu, miniature_shown ? current_anim_value * 0.9f : current_anim_value * 0.3f);
brush = nullptr;
winrt::check_hresult(d2d_dc->CreateSolidColorBrush(brushColor, brush.put()));
for (auto& monitor : monitors)
Expand Down
41 changes: 18 additions & 23 deletions src/modules/ShortcutGuide/ShortcutGuide/svgs/0.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 19 additions & 24 deletions src/modules/ShortcutGuide/ShortcutGuide/svgs/1.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 18 additions & 23 deletions src/modules/ShortcutGuide/ShortcutGuide/svgs/2.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 18 additions & 23 deletions src/modules/ShortcutGuide/ShortcutGuide/svgs/3.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 019c05c

Please sign in to comment.