From 019c05c8e4a4f2363d620e3d57f1575ab507dd8e Mon Sep 17 00:00:00 2001 From: Niels Laute Date: Fri, 5 Nov 2021 19:30:30 +0100 Subject: [PATCH] [Shortcut Guide] UI tweaks (#14215) * New SVGs * Updated tooltips * Tweaks * Portrait mode updates Co-authored-by: Laute --- .../ShortcutGuide/overlay_window.cpp | 37 +- .../ShortcutGuide/ShortcutGuide/svgs/0.svg | 41 +- .../ShortcutGuide/ShortcutGuide/svgs/1.svg | 43 +- .../ShortcutGuide/ShortcutGuide/svgs/2.svg | 41 +- .../ShortcutGuide/ShortcutGuide/svgs/3.svg | 41 +- .../ShortcutGuide/ShortcutGuide/svgs/4.svg | 43 +- .../ShortcutGuide/ShortcutGuide/svgs/5.svg | 41 +- .../ShortcutGuide/ShortcutGuide/svgs/6.svg | 41 +- .../ShortcutGuide/ShortcutGuide/svgs/7.svg | 41 +- .../ShortcutGuide/ShortcutGuide/svgs/8.svg | 41 +- .../ShortcutGuide/ShortcutGuide/svgs/9.svg | 41 +- .../ShortcutGuide/svgs/no_active_window.svg | 20 +- .../ShortcutGuide/svgs/overlay.svg | 407 +++++++++--------- .../ShortcutGuide/svgs/overlay_portrait.svg | 402 +++++++++-------- 14 files changed, 606 insertions(+), 674 deletions(-) diff --git a/src/modules/ShortcutGuide/ShortcutGuide/overlay_window.cpp b/src/modules/ShortcutGuide/ShortcutGuide/overlay_window.cpp index 908a67ad27..7cf670f01e 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/overlay_window.cpp +++ b/src/modules/ShortcutGuide/ShortcutGuide/overlay_window.cpp @@ -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); } } } @@ -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; @@ -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) diff --git a/src/modules/ShortcutGuide/ShortcutGuide/svgs/0.svg b/src/modules/ShortcutGuide/ShortcutGuide/svgs/0.svg index f70fdbf282..b797f8b7ef 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/svgs/0.svg +++ b/src/modules/ShortcutGuide/ShortcutGuide/svgs/0.svg @@ -1,26 +1,21 @@ - - 0 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/svgs/1.svg b/src/modules/ShortcutGuide/ShortcutGuide/svgs/1.svg index c8bcd2c608..6e1e3d28f1 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/svgs/1.svg +++ b/src/modules/ShortcutGuide/ShortcutGuide/svgs/1.svg @@ -1,26 +1,21 @@ - - 1 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + diff --git a/src/modules/ShortcutGuide/ShortcutGuide/svgs/2.svg b/src/modules/ShortcutGuide/ShortcutGuide/svgs/2.svg index d09aabe238..5183242c1b 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/svgs/2.svg +++ b/src/modules/ShortcutGuide/ShortcutGuide/svgs/2.svg @@ -1,26 +1,21 @@ - - 2 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/svgs/3.svg b/src/modules/ShortcutGuide/ShortcutGuide/svgs/3.svg index 97536f3e79..63ad68f061 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/svgs/3.svg +++ b/src/modules/ShortcutGuide/ShortcutGuide/svgs/3.svg @@ -1,26 +1,21 @@ - - 3 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/svgs/4.svg b/src/modules/ShortcutGuide/ShortcutGuide/svgs/4.svg index 0f148c6c7d..4f7e36f8bd 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/svgs/4.svg +++ b/src/modules/ShortcutGuide/ShortcutGuide/svgs/4.svg @@ -1,26 +1,21 @@ - - 4 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + diff --git a/src/modules/ShortcutGuide/ShortcutGuide/svgs/5.svg b/src/modules/ShortcutGuide/ShortcutGuide/svgs/5.svg index 7f8c38d2b2..0fd52f6585 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/svgs/5.svg +++ b/src/modules/ShortcutGuide/ShortcutGuide/svgs/5.svg @@ -1,26 +1,21 @@ - - 5 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/svgs/6.svg b/src/modules/ShortcutGuide/ShortcutGuide/svgs/6.svg index 53bac58d23..00303cdb32 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/svgs/6.svg +++ b/src/modules/ShortcutGuide/ShortcutGuide/svgs/6.svg @@ -1,26 +1,21 @@ - - 6 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/svgs/7.svg b/src/modules/ShortcutGuide/ShortcutGuide/svgs/7.svg index 85a7c84675..cce8aedbaa 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/svgs/7.svg +++ b/src/modules/ShortcutGuide/ShortcutGuide/svgs/7.svg @@ -1,26 +1,21 @@ - - 7 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/svgs/8.svg b/src/modules/ShortcutGuide/ShortcutGuide/svgs/8.svg index 574675daa4..57f4856b6b 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/svgs/8.svg +++ b/src/modules/ShortcutGuide/ShortcutGuide/svgs/8.svg @@ -1,26 +1,21 @@ - - 8 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/svgs/9.svg b/src/modules/ShortcutGuide/ShortcutGuide/svgs/9.svg index 57e73e21b9..2e0f33c493 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/svgs/9.svg +++ b/src/modules/ShortcutGuide/ShortcutGuide/svgs/9.svg @@ -1,26 +1,21 @@ - - 9 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/svgs/no_active_window.svg b/src/modules/ShortcutGuide/ShortcutGuide/svgs/no_active_window.svg index f6b549083a..69d390bd08 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/svgs/no_active_window.svg +++ b/src/modules/ShortcutGuide/ShortcutGuide/svgs/no_active_window.svg @@ -1,20 +1,6 @@ - - Group 7 - Created with Sketch. - - - - - - - - - - - - - - + + + \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/svgs/overlay.svg b/src/modules/ShortcutGuide/ShortcutGuide/svgs/overlay.svg index b4fb5815ae..aeb5854f7e 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/svgs/overlay.svg +++ b/src/modules/ShortcutGuide/ShortcutGuide/svgs/overlay.svg @@ -1,207 +1,200 @@ - - - - Group 5 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/modules/ShortcutGuide/ShortcutGuide/svgs/overlay_portrait.svg b/src/modules/ShortcutGuide/ShortcutGuide/svgs/overlay_portrait.svg index 1bf3f301a4..fdc20dabb7 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/svgs/overlay_portrait.svg +++ b/src/modules/ShortcutGuide/ShortcutGuide/svgs/overlay_portrait.svg @@ -1,209 +1,203 @@ - - Group 6 - Created with Sketch. - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file