diff options
| -rw-r--r-- | dash/DashController.cpp | 8 | ||||
| -rw-r--r-- | dash/DashView.cpp | 2 | ||||
| -rw-r--r-- | dash/previews/ActionButton.cpp | 4 | ||||
| -rw-r--r-- | manual-tests/Preview.txt | 19 | ||||
| -rw-r--r-- | plugins/unityshell/src/unityshell.h | 2 | ||||
| -rw-r--r-- | tests/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | tests/test_hud_controller.cpp | 6 |
7 files changed, 34 insertions, 8 deletions
diff --git a/dash/DashController.cpp b/dash/DashController.cpp index e5e8f6233..31b8b5234 100644 --- a/dash/DashController.cpp +++ b/dash/DashController.cpp @@ -24,6 +24,7 @@ #include "unity-shared/UnitySettings.h" #include "unity-shared/PanelStyle.h" +#include "unity-shared/DashStyle.h" #include "unity-shared/PluginAdapter.h" #include "unity-shared/UBusMessages.h" #include "unity-shared/UScreen.h" @@ -457,9 +458,14 @@ void Controller::OnDBusMethodCall(GDBusConnection* connection, const gchar* send nux::Geometry Controller::GetInputWindowGeometry() { EnsureDash(); + dash::Style& style = dash::Style::Instance(); nux::Geometry const& window_geo(window_->GetGeometry()); nux::Geometry const& view_content_geo(view_->GetContentGeometry()); - return nux::Geometry(window_geo.x, window_geo.y, view_content_geo.width, view_content_geo.height); + + nux::Geometry geo(window_geo.x, window_geo.y, view_content_geo.width, view_content_geo.height); + geo.width += style.GetDashRightTileWidth(); + geo.height += style.GetDashBottomTileHeight(); + return geo; } diff --git a/dash/DashView.cpp b/dash/DashView.cpp index b0713b7be..615036c65 100644 --- a/dash/DashView.cpp +++ b/dash/DashView.cpp @@ -495,7 +495,7 @@ nux::Geometry DashView::GetBestFitGeometry(nux::Geometry const& for_geo) void DashView::Draw(nux::GraphicsEngine& graphics_engine, bool force_draw) { - renderer_.DrawFull(graphics_engine, content_geo_, GetAbsoluteGeometry(), GetGeometry()); + renderer_.DrawFull(graphics_engine, content_geo_, GetAbsoluteGeometry(), GetGeometry(), true); } void DashView::DrawContent(nux::GraphicsEngine& graphics_engine, bool force_draw) diff --git a/dash/previews/ActionButton.cpp b/dash/previews/ActionButton.cpp index 9b06db051..03e325693 100644 --- a/dash/previews/ActionButton.cpp +++ b/dash/previews/ActionButton.cpp @@ -48,7 +48,7 @@ ActionButton::ActionButton(std::string const& action_hint, std::string const& la , image_(nullptr) { SetAcceptKeyNavFocusOnMouseDown(false); - SetAcceptKeyNavFocusOnMouseEnter(false); + SetAcceptKeyNavFocusOnMouseEnter(true); Init(); BuildLayout(label, icon_hint, ""); } @@ -263,7 +263,7 @@ void ActionButton::Draw(nux::GraphicsEngine& GfxContext, bool force_draw) texxform, nux::Color(1.0f, 1.0f, 1.0f, 1.0f)); - if (IsMouseInside() || HasKeyboardFocus()) + if (HasKeyboardFocus()) { GfxContext.QRP_1Tex(geo.x, geo.y, diff --git a/manual-tests/Preview.txt b/manual-tests/Preview.txt index 47a9770c6..b05a07877 100644 --- a/manual-tests/Preview.txt +++ b/manual-tests/Preview.txt @@ -151,3 +151,22 @@ Actions: Expected Result: A preview will open with the correct size initially (no size flicker). When the dash is resized, the preview will center its geometry and stay the correct size. + + +Two highlighted action buttons +------------------------------ +This tests that it's not possible to have two highlighted preview action buttons. + +Setup: +#. Open dash. +#. Open Files Lens. +#. Right-click the mouse on an icon (don't use folder icons because they have just one action button). +#. Wait for the preview window to open and finish animating. +#. Make sure that an action button is already highlighted (henceforth referred to as the button A) + +Actions: +#. Move the mouse to another action button (henceforth referred to as the button B) + +Expected Result: + The button A must not be highlighted. + The button B must be highlighted. diff --git a/plugins/unityshell/src/unityshell.h b/plugins/unityshell/src/unityshell.h index dabc386fe..f9cc1a065 100644 --- a/plugins/unityshell/src/unityshell.h +++ b/plugins/unityshell/src/unityshell.h @@ -62,7 +62,6 @@ #include <dlfcn.h> #include "HudController.h" -#include "ThumbnailGenerator.h" #include "WindowMinimizeSpeedController.h" namespace unity @@ -333,7 +332,6 @@ private: UBusManager ubus_manager_; glib::SourceManager sources_; - unity::ThumbnailGenerator thumb_generator; WindowMinimizeSpeedController* minimize_speed_controller; friend class UnityWindow; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3b868e16f..afe9a991f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -230,7 +230,6 @@ if (GTEST_SRC_DIR AND test_resultviewgrid.cpp test_shortcut_controller.cpp test_single_monitor_launcher_icon.cpp - test_software_center_launcher_icon.cpp test_expo_launcher_icon.cpp test_switcher_controller.cpp test_switcher_model.cpp diff --git a/tests/test_hud_controller.cpp b/tests/test_hud_controller.cpp index 018900bdd..32f8920bf 100644 --- a/tests/test_hud_controller.cpp +++ b/tests/test_hud_controller.cpp @@ -50,7 +50,11 @@ public: MOCK_CONST_METHOD0(GetName, std::string()); MOCK_METHOD1(AddProperties, void(GVariantBuilder*)); MOCK_METHOD2(Draw, void(nux::GraphicsEngine&, bool)); - MOCK_METHOD0(GetContentGeometry, nux::Geometry()); + nux::Geometry GetContentGeometry() + { + return nux::Geometry(); + } + }; |
