Merge lp:~3v1n0/unity/hidpi-better-scaling into lp:unity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Stephen M. Webb
Approved revision: no longer in the source branch.
Merged at revision: 3694
Proposed branch: lp:~3v1n0/unity/hidpi-better-scaling
Merge into: lp:unity
Prerequisite: lp:~hikiko/unity/unity.ui-scale-factor
Diff against target: 7336 lines (+2891/-1089)
113 files modified
CMakeLists.txt (+1/-0)
UnityCore/DBusIndicators.cpp (+53/-0)
UnityCore/DBusIndicators.h (+1/-0)
UnityCore/GTKWrapper.h (+1/-7)
UnityCore/Indicators.h (+2/-0)
dash/DashController.cpp (+3/-5)
dash/DashView.cpp (+15/-22)
dash/DashView.h (+1/-0)
decorations/DecoratedWindow.cpp (+20/-13)
decorations/DecoratedWindow.h (+1/-0)
decorations/DecorationsDataPool.cpp (+81/-28)
decorations/DecorationsDataPool.h (+6/-1)
decorations/DecorationsMenuDropdown.cpp (+11/-11)
decorations/DecorationsMenuEntry.cpp (+5/-4)
decorations/DecorationsMenuLayout.cpp (+8/-2)
decorations/DecorationsPriv.h (+1/-0)
decorations/DecorationsSlidingLayout.cpp (+1/-0)
decorations/DecorationsTitle.cpp (+5/-2)
decorations/DecorationsWidgets.cpp (+19/-18)
decorations/DecorationsWidgets.h (+8/-9)
decorations/DecorationsWindowButton.cpp (+2/-1)
hud/HudController.cpp (+1/-1)
launcher/CairoBaseWindow.cpp (+3/-0)
launcher/CairoBaseWindow.h (+2/-1)
launcher/EdgeBarrierController.cpp (+2/-2)
launcher/EdgeBarrierControllerPrivate.h (+1/-1)
launcher/Launcher.cpp (+11/-14)
launcher/LauncherController.cpp (+1/-26)
launcher/LauncherControllerPrivate.h (+0/-4)
launcher/LauncherIcon.cpp (+6/-9)
launcher/QuicklistMenuItem.cpp (+33/-11)
launcher/QuicklistMenuItem.h (+11/-3)
launcher/QuicklistMenuItemCheckmark.cpp (+2/-7)
launcher/QuicklistMenuItemCheckmark.h (+1/-1)
launcher/QuicklistMenuItemLabel.cpp (+2/-7)
launcher/QuicklistMenuItemLabel.h (+1/-1)
launcher/QuicklistMenuItemRadio.cpp (+2/-7)
launcher/QuicklistMenuItemRadio.h (+1/-1)
launcher/QuicklistMenuItemSeparator.cpp (+19/-11)
launcher/QuicklistMenuItemSeparator.h (+2/-1)
launcher/QuicklistView.cpp (+115/-150)
launcher/QuicklistView.h (+2/-6)
launcher/Tooltip.cpp (+73/-75)
launcher/XdndCollectionWindowImp.cpp (+1/-1)
launcher/XdndManagerImp.cpp (+1/-0)
panel/PanelController.cpp (+19/-39)
panel/PanelController.h (+0/-3)
panel/PanelIndicatorEntryDropdownView.cpp (+1/-1)
panel/PanelIndicatorEntryView.cpp (+131/-157)
panel/PanelIndicatorEntryView.h (+5/-13)
panel/PanelIndicatorsView.cpp (+3/-0)
panel/PanelMenuView.cpp (+15/-13)
panel/PanelMenuView.h (+1/-2)
panel/PanelView.cpp (+16/-22)
panel/PanelView.h (+1/-3)
plugins/unityshell/src/unityshell.cpp (+42/-38)
plugins/unityshell/src/unityshell.h (+1/-1)
resources/close_dash.svg (+74/-0)
resources/close_dash_disabled.svg (+74/-0)
resources/close_dash_prelight.svg (+94/-0)
resources/close_dash_pressed.svg (+74/-0)
resources/maximize_dash.svg (+73/-0)
resources/maximize_dash_disabled.svg (+73/-0)
resources/maximize_dash_prelight.svg (+92/-0)
resources/maximize_dash_pressed.svg (+73/-0)
resources/minimize_dash.svg (+74/-0)
resources/minimize_dash_disabled.svg (+74/-0)
resources/minimize_dash_prelight.svg (+94/-0)
resources/minimize_dash_pressed.svg (+74/-0)
resources/progress_bar_fill.svg (+141/-0)
resources/progress_bar_trough.svg (+179/-0)
resources/unmaximize_dash.svg (+74/-0)
resources/unmaximize_dash_disabled.svg (+74/-0)
resources/unmaximize_dash_prelight.svg (+94/-0)
resources/unmaximize_dash_pressed.svg (+74/-0)
services/panel-main.c (+41/-8)
services/panel-service.c (+89/-55)
tests/mock_indicators.h (+1/-0)
tests/test_decorations_widgets.cpp (+4/-4)
tests/test_launcher.cpp (+1/-1)
tests/test_launcher_controller.cpp (+2/-3)
tests/test_panel_controller.cpp (+2/-2)
tests/test_panel_style.cpp (+1/-0)
tests/test_raw_pixel.cpp (+5/-0)
tests/test_trash_launcher_icon.cpp (+0/-3)
unity-shared/AbstractIconRenderer.h (+1/-0)
unity-shared/CompizUtils.cpp (+2/-1)
unity-shared/CompizUtils.h (+1/-1)
unity-shared/DecorationStyle.cpp (+68/-40)
unity-shared/DecorationStyle.h (+7/-5)
unity-shared/EMConverter.cpp (+8/-2)
unity-shared/EMConverter.h (+2/-2)
unity-shared/IconRenderer.cpp (+29/-13)
unity-shared/IconRenderer.h (+2/-0)
unity-shared/MenuManager.cpp (+12/-0)
unity-shared/OverlayWindowButtons.cpp (+1/-1)
unity-shared/PanelStyle.cpp (+111/-50)
unity-shared/PanelStyle.h (+10/-9)
unity-shared/PluginAdapter.cpp (+2/-2)
unity-shared/RawPixel.cpp (+17/-12)
unity-shared/RawPixel.h (+7/-7)
unity-shared/SearchBar.cpp (+1/-2)
unity-shared/StaticCairoText.cpp (+28/-3)
unity-shared/StaticCairoText.h (+3/-0)
unity-shared/TextInput.cpp (+1/-2)
unity-shared/TextureCache.cpp (+9/-7)
unity-shared/TextureCache.h (+3/-3)
unity-shared/UScreen.cpp (+9/-9)
unity-shared/UScreen.h (+10/-9)
unity-shared/UnitySettings.cpp (+29/-37)
unity-shared/VScrollBarOverlayWindow.cpp (+1/-2)
unity-shared/WindowButtonPriv.h (+0/-2)
unity-shared/WindowButtons.cpp (+19/-37)
To merge this branch: bzr merge lp:~3v1n0/unity/hidpi-better-scaling
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Brandon Schaefer (community) Needs Fixing
Review via email: mp+208238@code.launchpad.net

Commit message

Panel, Decorations, Launcher, Quicklist, Tooltip: correctly scale items based on the monitor settings

Adapt elements to match their monitor DPI scale settings.
We mostly use cairo_surface_set_device_scale to easily scale cairo-generated textures.

Description of the change

Lots of fixes around... Things should scale properly now.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

We should just use RawPixels in:
992 === modified file 'launcher/QuicklistMenuItemSeparator.cpp'

That way we can each hard coded pixel to the correct Converter vs <number> * scale.

1659 + SetMinMaxSize(std::ceil(width * dpi_scale), std::ceil(height * dpi_scale));

Same here, as there is a valid cv_ here, we could jsut do width.CP(cv_) etc.

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Seeing offset issues with tooltips and quicklists. The only needs fixing issue i see. Unless you want to push those fixes later. Theres quite a bit of clean up in the tooltip/ql code so either way works for me.

As well as SVG panel indicator icon issues (Ill look into fixing this in a different branch so not a blocker for that).

review: Needs Fixing
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Nice. Changes look good to me. We did doubles before with the EMConverter to cater to Cairo, but now we use DPIScale() plus Cairos built in scale method. So we don't need double anymore, and best to round it in a smarter way. :).

Awesome!

review: Approve
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

LGTM

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

New changes look good!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Looks good, been testing it for a day or so now. Besides the tests not compiling, which is needs fixing, which i've already poked you about in IRC :).

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

New failure in compiling :) (looks like panel_style something about nux object? strange error)

review: Needs Fixing
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Looks like a forward declaration error :(, now it doesn't know where Object/TEXT is defined. Possibly you'll need to be explicit with a few headers (that don't include all of Nux/Nux.h)

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

> Looks like a forward declaration error :(, now it doesn't know where
> Object/TEXT is defined. Possibly you'll need to be explicit with a few headers
> (that don't include all of Nux/Nux.h)

Ok, this should build now, to get high-resolution indicators (and faster as well) you also need lp:~3v1n0/libindicator/reduce-image-serialization

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2014-01-23 09:44:40 +0000
+++ CMakeLists.txt 2014-03-03 11:01:22 +0000
@@ -219,6 +219,7 @@
219 ${UNITY_PROTOCOL_PRIVATE_DEPS}219 ${UNITY_PROTOCOL_PRIVATE_DEPS}
220 atk220 atk
221 atk-bridge-2.0221 atk-bridge-2.0
222 cairo>=1.13.1
222 dbusmenu-glib-0.4223 dbusmenu-glib-0.4
223 dee-1.0224 dee-1.0
224 gio-2.0>=2.30.0225 gio-2.0>=2.30.0
225226
=== modified file 'UnityCore/DBusIndicators.cpp'
--- UnityCore/DBusIndicators.cpp 2014-02-11 03:11:47 +0000
+++ UnityCore/DBusIndicators.cpp 2014-03-03 11:01:22 +0000
@@ -59,6 +59,7 @@
59 void OnDisconnected();59 void OnDisconnected();
6060
61 void OnReSync(GVariant* parameters);61 void OnReSync(GVariant* parameters);
62 void OnIconsPathChanged(GVariant* parameters);
62 void OnEntryActivated(GVariant* parameters);63 void OnEntryActivated(GVariant* parameters);
63 void OnEntryActivatedRequest(GVariant* parameters);64 void OnEntryActivatedRequest(GVariant* parameters);
64 void OnEntryShowNowChanged(GVariant* parameters);65 void OnEntryShowNowChanged(GVariant* parameters);
@@ -74,6 +75,7 @@
74 glib::Source::UniquePtr reconnect_timeout_;75 glib::Source::UniquePtr reconnect_timeout_;
75 glib::Source::UniquePtr show_entry_idle_;76 glib::Source::UniquePtr show_entry_idle_;
76 glib::Source::UniquePtr show_appmenu_idle_;77 glib::Source::UniquePtr show_appmenu_idle_;
78 std::vector<std::string> icon_paths_;
77 std::map<std::string, EntryLocationMap> cached_locations_;79 std::map<std::string, EntryLocationMap> cached_locations_;
78};80};
7981
@@ -85,6 +87,7 @@
85 G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES)87 G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES)
86{88{
87 gproxy_.Connect("ReSync", sigc::mem_fun(this, &DBusIndicators::Impl::OnReSync));89 gproxy_.Connect("ReSync", sigc::mem_fun(this, &DBusIndicators::Impl::OnReSync));
90 gproxy_.Connect("IconPathsChanged", sigc::mem_fun(this, &DBusIndicators::Impl::OnIconsPathChanged));
88 gproxy_.Connect("EntryActivated", sigc::mem_fun(this, &DBusIndicators::Impl::OnEntryActivated));91 gproxy_.Connect("EntryActivated", sigc::mem_fun(this, &DBusIndicators::Impl::OnEntryActivated));
89 gproxy_.Connect("EntryActivateRequest", sigc::mem_fun(this, &DBusIndicators::Impl::OnEntryActivatedRequest));92 gproxy_.Connect("EntryActivateRequest", sigc::mem_fun(this, &DBusIndicators::Impl::OnEntryActivatedRequest));
90 gproxy_.Connect("EntryShowNowChanged", sigc::mem_fun(this, &DBusIndicators::Impl::OnEntryShowNowChanged));93 gproxy_.Connect("EntryShowNowChanged", sigc::mem_fun(this, &DBusIndicators::Impl::OnEntryShowNowChanged));
@@ -126,6 +129,7 @@
126129
127void DBusIndicators::Impl::OnConnected()130void DBusIndicators::Impl::OnConnected()
128{131{
132 OnIconsPathChanged(nullptr);
129 RequestSyncAll();133 RequestSyncAll();
130}134}
131135
@@ -156,6 +160,50 @@
156 }160 }
157}161}
158162
163void DBusIndicators::Impl::OnIconsPathChanged(GVariant*)
164{
165 gproxy_.CallBegin("GetIconPaths", nullptr, [this] (GVariant* paths, glib::Error const& e) {
166 if (e || !paths)
167 {
168 LOG_ERROR(logger) << "Something went wrong on GetIconPaths: " << e;
169 return;
170 }
171
172 bool changed = false;
173 gsize length;
174 glib::Variant array(g_variant_get_child_value(paths, 0));
175 const gchar** icon_paths = g_variant_get_strv(array, &length);
176
177 if (icon_paths_.size() != length)
178 {
179 changed = true;
180 }
181 else
182 {
183 for (unsigned i = 0; i < length; ++i)
184 {
185 if (icon_paths_[i] != glib::gchar_to_string(icon_paths[i]))
186 {
187 changed = true;
188 break;
189 }
190 }
191 }
192
193 if (changed)
194 {
195 icon_paths_.resize(length);
196
197 for (unsigned i = 0; i < length; ++i)
198 icon_paths_[i] = glib::gchar_to_string(icon_paths[i]);
199
200 owner_->icon_paths_changed.emit();
201 }
202
203 g_free(icon_paths);
204 });
205}
206
159void DBusIndicators::Impl::OnEntryActivated(GVariant* parameters)207void DBusIndicators::Impl::OnEntryActivated(GVariant* parameters)
160{208{
161 glib::String panel;209 glib::String panel;
@@ -458,5 +506,10 @@
458 pimpl->OnShowAppMenu(xid, x, y);506 pimpl->OnShowAppMenu(xid, x, y);
459}507}
460508
509std::vector<std::string> const& DBusIndicators::IconPaths() const
510{
511 return pimpl->icon_paths_;
512}
513
461} // namespace indicator514} // namespace indicator
462} // namespace unity515} // namespace unity
463516
=== modified file 'UnityCore/DBusIndicators.h'
--- UnityCore/DBusIndicators.h 2014-01-28 11:50:02 +0000
+++ UnityCore/DBusIndicators.h 2014-03-03 11:01:22 +0000
@@ -38,6 +38,7 @@
38 DBusIndicators();38 DBusIndicators();
39 ~DBusIndicators();39 ~DBusIndicators();
4040
41 std::vector<std::string> const& IconPaths() const;
41 void ShowEntriesDropdown(Indicator::Entries const&, Entry::Ptr const&, unsigned xid, int x, int y);42 void ShowEntriesDropdown(Indicator::Entries const&, Entry::Ptr const&, unsigned xid, int x, int y);
42 void SyncGeometries(std::string const& name, EntryLocationMap const& locations);43 void SyncGeometries(std::string const& name, EntryLocationMap const& locations);
4344
4445
=== modified file 'UnityCore/GTKWrapper.h'
--- UnityCore/GTKWrapper.h 2013-05-17 16:52:19 +0000
+++ UnityCore/GTKWrapper.h 2014-03-03 11:01:22 +0000
@@ -29,13 +29,7 @@
2929
30#if GTK_CHECK_VERSION(3, 8, 0)30#if GTK_CHECK_VERSION(3, 8, 0)
3131
32class IconInfo : public glib::Object<GtkIconInfo>32typedef glib::Object<GtkIconInfo> IconInfo;
33{
34public:
35 IconInfo(GtkIconInfo *info = nullptr)
36 : glib::Object<GtkIconInfo>(info)
37 {}
38};
3933
40#else34#else
4135
4236
=== modified file 'UnityCore/Indicators.h'
--- UnityCore/Indicators.h 2014-02-12 23:37:24 +0000
+++ UnityCore/Indicators.h 2014-03-03 11:01:22 +0000
@@ -40,6 +40,7 @@
40 virtual ~Indicators();40 virtual ~Indicators();
4141
42 IndicatorsList GetIndicators() const;42 IndicatorsList GetIndicators() const;
43 virtual std::vector<std::string> const& IconPaths() const = 0;
4344
44 virtual void SyncGeometries(std::string const& panel, EntryLocationMap const&) = 0;45 virtual void SyncGeometries(std::string const& panel, EntryLocationMap const&) = 0;
45 virtual void ShowEntriesDropdown(Indicator::Entries const&, Entry::Ptr const&, unsigned xid, int x, int y) = 0;46 virtual void ShowEntriesDropdown(Indicator::Entries const&, Entry::Ptr const&, unsigned xid, int x, int y) = 0;
@@ -47,6 +48,7 @@
47 // Signals48 // Signals
48 sigc::signal<void, Indicator::Ptr const&> on_object_added;49 sigc::signal<void, Indicator::Ptr const&> on_object_added;
49 sigc::signal<void, Indicator::Ptr const&> on_object_removed;50 sigc::signal<void, Indicator::Ptr const&> on_object_removed;
51 sigc::signal<void> icon_paths_changed;
5052
51 /**53 /**
52 * Service wants the view to activate an entry.54 * Service wants the view to activate an entry.
5355
=== modified file 'dash/DashController.cpp'
--- dash/DashController.cpp 2014-01-16 00:24:04 +0000
+++ dash/DashController.cpp 2014-03-03 11:01:22 +0000
@@ -92,7 +92,7 @@
92 }92 }
9393
94 SetupWindow();94 SetupWindow();
95 UScreen::GetDefault()->changed.connect([this] (int, std::vector<nux::Geometry>&) { Relayout(true); });95 UScreen::GetDefault()->changed.connect([this] (int, std::vector<nux::Geometry> const&) { Relayout(true); });
9696
97 Settings::Instance().form_factor.changed.connect([this](FormFactor)97 Settings::Instance().form_factor.changed.connect([this](FormFactor)
98 {98 {
@@ -249,8 +249,7 @@
249 nux::Geometry geo = GetIdealWindowGeometry();249 nux::Geometry geo = GetIdealWindowGeometry();
250 view_->Relayout();250 view_->Relayout();
251 window_->SetGeometry(geo);251 window_->SetGeometry(geo);
252 panel::Style &panel_style = panel::Style::Instance();252 view_->SetMonitorOffset(launcher_width, panel::Style::Instance().PanelHeight(monitor_));
253 view_->SetMonitorOffset(launcher_width, panel_style.PanelHeight(monitor_));
254}253}
255254
256void Controller::OnMouseDownOutsideWindow(int x, int y,255void Controller::OnMouseDownOutsideWindow(int x, int y,
@@ -299,9 +298,8 @@
299 }298 }
300299
301 monitor_ = GetIdealMonitor();300 monitor_ = GetIdealMonitor();
302301 view_->SetMonitorOffset(launcher_width, panel::Style::Instance().PanelHeight(monitor_));
303 view_->AboutToShow();302 view_->AboutToShow();
304
305 FocusWindow();303 FocusWindow();
306304
307 need_show_ = false;305 need_show_ = false;
308306
=== modified file 'dash/DashView.cpp'
--- dash/DashView.cpp 2014-02-20 21:37:37 +0000
+++ dash/DashView.cpp 2014-03-03 11:01:22 +0000
@@ -36,7 +36,6 @@
36#include "unity-shared/DashStyle.h"36#include "unity-shared/DashStyle.h"
37#include "unity-shared/KeyboardUtil.h"37#include "unity-shared/KeyboardUtil.h"
38#include "unity-shared/PreviewStyle.h"38#include "unity-shared/PreviewStyle.h"
39#include "unity-shared/PanelStyle.h"
40#include "unity-shared/UBusMessages.h"39#include "unity-shared/UBusMessages.h"
41#include "unity-shared/UnitySettings.h"40#include "unity-shared/UnitySettings.h"
42#include "unity-shared/WindowManager.h"41#include "unity-shared/WindowManager.h"
@@ -169,6 +168,8 @@
169{168{
170 renderer_.x_offset = x;169 renderer_.x_offset = x;
171 renderer_.y_offset = y;170 renderer_.y_offset = y;
171
172 top_space_->SetMinMaxSize(0, y);
172}173}
173174
174bool DashView::IsCommandLensOpen() const175bool DashView::IsCommandLensOpen() const
@@ -518,14 +519,14 @@
518void DashView::SetupViews()519void DashView::SetupViews()
519{520{
520 dash::Style& style = dash::Style::Instance();521 dash::Style& style = dash::Style::Instance();
521 panel::Style &panel_style = panel::Style::Instance();
522 int panel_height = panel_style.PanelHeight();
523522
524 layout_ = new nux::VLayout();523 layout_ = new nux::VLayout();
525 layout_->SetLeftAndRightPadding(style.GetVSeparatorSize(), 0);524 layout_->SetLeftAndRightPadding(style.GetVSeparatorSize(), 0);
526 layout_->SetTopAndBottomPadding(style.GetHSeparatorSize(), 0);525 layout_->SetTopAndBottomPadding(style.GetHSeparatorSize(), 0);
527 SetLayout(layout_);526 SetLayout(layout_);
528 layout_->AddLayout(new nux::SpaceLayout(0, 0, panel_height, panel_height), 0);527
528 top_space_ = new nux::SpaceLayout(0, 0, renderer_.y_offset(), renderer_.y_offset());
529 layout_->AddLayout(top_space_, 0);
529530
530 content_layout_ = new DashLayout(NUX_TRACKER_LOCATION);531 content_layout_ = new DashLayout(NUX_TRACKER_LOCATION);
531 content_layout_->SetTopAndBottomPadding(style.GetDashViewTopPadding(), 0);532 content_layout_->SetTopAndBottomPadding(style.GetDashViewTopPadding(), 0);
@@ -611,8 +612,7 @@
611nux::Geometry DashView::GetBestFitGeometry(nux::Geometry const& for_geo)612nux::Geometry DashView::GetBestFitGeometry(nux::Geometry const& for_geo)
612{613{
613 dash::Style& style = dash::Style::Instance();614 dash::Style& style = dash::Style::Instance();
614 panel::Style &panel_style = panel::Style::Instance();615 int panel_height = renderer_.y_offset;
615 int panel_height = panel_style.PanelHeight();
616616
617 int width = 0, height = 0;617 int width = 0, height = 0;
618 int tile_width = style.GetTileWidth();618 int tile_width = style.GetTileWidth();
@@ -649,29 +649,25 @@
649649
650void DashView::Draw(nux::GraphicsEngine& graphics_engine, bool force_draw)650void DashView::Draw(nux::GraphicsEngine& graphics_engine, bool force_draw)
651{651{
652 panel::Style &panel_style = panel::Style::Instance();
653 nux::Geometry const& renderer_geo_abs(GetRenderAbsoluteGeometry());652 nux::Geometry const& renderer_geo_abs(GetRenderAbsoluteGeometry());
654 nux::Geometry renderer_geo(GetGeometry());653 nux::Geometry renderer_geo(GetGeometry());
655 int panel_height = panel_style.PanelHeight();654 renderer_geo.y += renderer_.y_offset;
656655 renderer_geo.height += renderer_.y_offset;
657 renderer_geo.y += panel_height;
658 renderer_geo.height += panel_height;
659656
660 renderer_.DrawFull(graphics_engine, content_geo_, renderer_geo_abs, renderer_geo, false);657 renderer_.DrawFull(graphics_engine, content_geo_, renderer_geo_abs, renderer_geo, false);
661}658}
662659
663void DashView::DrawContent(nux::GraphicsEngine& graphics_engine, bool force_draw)660void DashView::DrawContent(nux::GraphicsEngine& graphics_engine, bool force_draw)
664{661{
665 panel::Style& panel_style = panel::Style::Instance();662 int renderer_y_offset = renderer_.y_offset();
666 int panel_height = panel_style.PanelHeight();
667663
668 nux::Geometry renderer_geo_abs(GetAbsoluteGeometry());664 nux::Geometry renderer_geo_abs(GetAbsoluteGeometry());
669 renderer_geo_abs.y += panel_height;665 renderer_geo_abs.y += renderer_y_offset;
670 renderer_geo_abs.height -= panel_height;666 renderer_geo_abs.height -= renderer_y_offset;
671667
672 nux::Geometry renderer_geo(GetGeometry());668 nux::Geometry renderer_geo(GetGeometry());
673 renderer_geo.y += panel_height;669 renderer_geo.y += renderer_y_offset;
674 renderer_geo.height += panel_height;670 renderer_geo.height += renderer_y_offset;
675671
676 renderer_.DrawInner(graphics_engine, content_geo_, renderer_geo_abs, renderer_geo);672 renderer_.DrawInner(graphics_engine, content_geo_, renderer_geo_abs, renderer_geo);
677673
@@ -1692,12 +1688,9 @@
16921688
1693nux::Geometry DashView::GetRenderAbsoluteGeometry() const1689nux::Geometry DashView::GetRenderAbsoluteGeometry() const
1694{1690{
1695 panel::Style &panel_style = panel::Style::Instance();
1696 int panel_height = panel_style.PanelHeight();
1697
1698 nux::Geometry renderer_geo_abs(GetAbsoluteGeometry());1691 nux::Geometry renderer_geo_abs(GetAbsoluteGeometry());
1699 renderer_geo_abs.y += panel_height;1692 renderer_geo_abs.y += renderer_.y_offset;
1700 renderer_geo_abs.height -= panel_height;1693 renderer_geo_abs.height -= renderer_.y_offset;
1701 return renderer_geo_abs;1694 return renderer_geo_abs;
1702}1695}
17031696
17041697
=== modified file 'dash/DashView.h'
--- dash/DashView.h 2013-11-20 21:39:40 +0000
+++ dash/DashView.h 2014-03-03 11:01:22 +0000
@@ -152,6 +152,7 @@
152 SearchBar* search_bar_;152 SearchBar* search_bar_;
153 nux::VLayout* scopes_layout_;153 nux::VLayout* scopes_layout_;
154 ScopeBar* scope_bar_;154 ScopeBar* scope_bar_;
155 nux::SpaceLayout* top_space_;
155156
156 nux::ObjectPtr<ScopeView> active_scope_view_;157 nux::ObjectPtr<ScopeView> active_scope_view_;
157 nux::ObjectPtr<ScopeView> preview_scope_view_;158 nux::ObjectPtr<ScopeView> preview_scope_view_;
158159
=== modified file 'decorations/DecoratedWindow.cpp'
--- decorations/DecoratedWindow.cpp 2014-02-20 16:24:43 +0000
+++ decorations/DecoratedWindow.cpp 2014-03-03 11:01:22 +0000
@@ -25,7 +25,6 @@
25#include "DecorationsTitle.h"25#include "DecorationsTitle.h"
26#include "DecorationsSlidingLayout.h"26#include "DecorationsSlidingLayout.h"
27#include "DecorationsMenuLayout.h"27#include "DecorationsMenuLayout.h"
28#include "RawPixel.h"
29#include "WindowManager.h"28#include "WindowManager.h"
30#include "UnitySettings.h"29#include "UnitySettings.h"
3130
@@ -93,6 +92,7 @@
93 return true;92 return true;
94 });93 });
9594
95 parent->dpi_scale.SetGetterFunction([this] { return cv_->DPIScale(); });
96 parent->scaled.changed.connect(sigc::hide(sigc::mem_fun(this, &Impl::Update)));96 parent->scaled.changed.connect(sigc::hide(sigc::mem_fun(this, &Impl::Update)));
9797
98 if (win_->isViewable() || win_->shaded())98 if (win_->isViewable() || win_->shaded())
@@ -141,16 +141,16 @@
141 return;141 return;
142142
143 auto const& sb = Style::Get()->Border();143 auto const& sb = Style::Get()->Border();
144 CompWindowExtents border(RawPixel(sb.left).CP(cv_),144 CompWindowExtents border(cv_->CP(sb.left),
145 RawPixel(sb.right).CP(cv_),145 cv_->CP(sb.right),
146 RawPixel(sb.top).CP(cv_),146 cv_->CP(sb.top),
147 RawPixel(sb.bottom).CP(cv_));147 cv_->CP(sb.bottom));
148148
149 auto const& ib = Style::Get()->InputBorder();149 auto const& ib = Style::Get()->InputBorder();
150 CompWindowExtents input(RawPixel(sb.left + ib.left).CP(cv_),150 CompWindowExtents input(cv_->CP(sb.left + ib.left),
151 RawPixel(sb.right + ib.right).CP(cv_),151 cv_->CP(sb.right + ib.right),
152 RawPixel(sb.top + ib.top).CP(cv_),152 cv_->CP(sb.top + ib.top),
153 RawPixel(sb.bottom + ib.bottom).CP(cv_));153 cv_->CP(sb.bottom + ib.bottom));
154154
155 if (win_->border() != border || win_->input() != input)155 if (win_->border() != border || win_->input() != input)
156 win_->setWindowFrameExtents(&border, &input);156 win_->setWindowFrameExtents(&border, &input);
@@ -292,6 +292,11 @@
292 Decorate();292 Decorate();
293 });293 });
294294
295 dpi_changed_ = Settings::Instance().dpi_changed.connect([this] {
296 Update();
297 top_layout_->scale = cv_->DPIScale();
298 });
299
295 input_mixer_ = std::make_shared<InputMixer>();300 input_mixer_ = std::make_shared<InputMixer>();
296301
297 if (win_->actions() & CompWindowActionResizeMask)302 if (win_->actions() & CompWindowActionResizeMask)
@@ -314,7 +319,7 @@
314 top_layout_->right_padding = padding.right;319 top_layout_->right_padding = padding.right;
315 top_layout_->top_padding = padding.top;320 top_layout_->top_padding = padding.top;
316 top_layout_->focused = active();321 top_layout_->focused = active();
317 top_layout_->scale = Settings::Instance().em(monitor_)->DPIScale();322 top_layout_->scale = cv_->DPIScale();
318323
319 if (win_->actions() & CompWindowActionCloseMask)324 if (win_->actions() & CompWindowActionCloseMask)
320 top_layout_->Append(std::make_shared<WindowButton>(win_, WindowButtonType::CLOSE));325 top_layout_->Append(std::make_shared<WindowButton>(win_, WindowButtonType::CLOSE));
@@ -353,6 +358,7 @@
353358
354 UnsetAppMenu();359 UnsetAppMenu();
355 theme_changed_->disconnect();360 theme_changed_->disconnect();
361 dpi_changed_->disconnect();
356 top_layout_.reset();362 top_layout_.reset();
357 input_mixer_.reset();363 input_mixer_.reset();
358 edge_borders_.reset();364 edge_borders_.reset();
@@ -413,9 +419,10 @@
413419
414 if (deco_tex.quad.box.width() != geo.width || deco_tex.quad.box.height() != geo.height)420 if (deco_tex.quad.box.width() != geo.width || deco_tex.quad.box.height() != geo.height)
415 {421 {
416 cu::CairoContext ctx(geo.width, geo.height);422 double scale = top_layout_->scale();
423 cu::CairoContext ctx(geo.width, geo.height, scale);
417 auto ws = active() ? WidgetState::NORMAL : WidgetState::BACKDROP;424 auto ws = active() ? WidgetState::NORMAL : WidgetState::BACKDROP;
418 Style::Get()->DrawSide(s, ws, ctx, geo.width, geo.height);425 Style::Get()->DrawSide(s, ws, ctx, geo.width / scale, geo.height / scale);
419 deco_tex.SetTexture(ctx);426 deco_tex.SetTexture(ctx);
420 }427 }
421428
@@ -763,7 +770,7 @@
763 .add("active", impl_->active())770 .add("active", impl_->active())
764 .add("scaled", scaled())771 .add("scaled", scaled())
765 .add("monitor", impl_->monitor_)772 .add("monitor", impl_->monitor_)
766 .add("dpi_scale", impl_->cv_->DPIScale())773 .add("dpi_scale", dpi_scale())
767 .add("xid", impl_->win_->id())774 .add("xid", impl_->win_->id())
768 .add("fully_decorable", cu::IsWindowFullyDecorable(impl_->win_))775 .add("fully_decorable", cu::IsWindowFullyDecorable(impl_->win_))
769 .add("shadow_decorable", cu::IsWindowShadowDecorable(impl_->win_))776 .add("shadow_decorable", cu::IsWindowShadowDecorable(impl_->win_))
770777
=== modified file 'decorations/DecoratedWindow.h'
--- decorations/DecoratedWindow.h 2014-02-19 02:16:22 +0000
+++ decorations/DecoratedWindow.h 2014-03-03 11:01:22 +0000
@@ -43,6 +43,7 @@
4343
44 nux::RWProperty<std::string> title;44 nux::RWProperty<std::string> title;
45 nux::Property<bool> scaled;45 nux::Property<bool> scaled;
46 nux::ROProperty<double> dpi_scale;
4647
47 void Update();48 void Update();
48 void Undecorate();49 void Undecorate();
4950
=== modified file 'decorations/DecorationsDataPool.cpp'
--- decorations/DecorationsDataPool.cpp 2014-01-16 17:43:36 +0000
+++ decorations/DecorationsDataPool.cpp 2014-03-03 11:01:22 +0000
@@ -22,6 +22,8 @@
22#include <sigc++/adaptors/hide.h>22#include <sigc++/adaptors/hide.h>
23#include "glow_texture.h"23#include "glow_texture.h"
24#include "DecorationsDataPool.h"24#include "DecorationsDataPool.h"
25#include "UnitySettings.h"
26#include "UScreen.h"
2527
26namespace unity28namespace unity
27{29{
@@ -69,8 +71,12 @@
69 SetupCursors();71 SetupCursors();
70 SetupTextures();72 SetupTextures();
7173
72 auto cb = sigc::hide(sigc::mem_fun(this, &DataPool::SetupTextures));74 CompSize glow_size(texture::GLOW_SIZE, texture::GLOW_SIZE);
73 Style::Get()->theme.changed.connect(cb);75 glow_texture_ = std::make_shared<cu::SimpleTexture>(GLTexture::imageDataToTexture(texture::GLOW, glow_size, GL_RGBA, GL_UNSIGNED_BYTE));
76
77 auto cb = sigc::mem_fun(this, &DataPool::SetupTextures);
78 Style::Get()->theme.changed.connect(sigc::hide(cb));
79 unity::Settings::Instance().dpi_changed.connect(cb);
74}80}
7581
76DataPool::~DataPool()82DataPool::~DataPool()
@@ -98,37 +104,63 @@
98104
99void DataPool::SetupTextures()105void DataPool::SetupTextures()
100{106{
101 CompSize size;
102 CompString plugin_name(PLUGIN_NAME);
103 auto const& style = Style::Get();107 auto const& style = Style::Get();
104108 unsigned monitors = UScreen::GetDefault()->GetPluggedMonitorsNumber();
105 for (unsigned button = 0; button < window_buttons_.size(); ++button)109 auto& settings = Settings::Instance();
110 bool found_normal = false;
111 nux::Size size;
112
113 scaled_window_buttons_.clear();
114
115 for (unsigned monitor = 0; monitor < monitors; ++monitor)
106 {116 {
107 for (unsigned state = 0; state < window_buttons_[button].size(); ++state)117 double scale = settings.em(monitor)->DPIScale();
108 {118 bool scaled = (scale != 1.0f);
109 auto file = style->WindowButtonFile(WindowButtonType(button), WidgetState(state));119
110 auto const& tex_list = GLTexture::readImageToTexture(file, plugin_name, size);120 if (!scaled)
111121 {
112 if (!tex_list.empty())122 if (found_normal)
113 {123 continue;
114 LOG_DEBUG(logger) << "Loading texture " << file;124
115 window_buttons_[button][state] = std::make_shared<cu::SimpleTexture>(tex_list);125 found_normal = true;
116 }126 }
117 else127
118 {128 auto& destination = scaled ? scaled_window_buttons_[scale] : window_buttons_;
119 LOG_WARN(logger) << "Impossible to load local button texture file; "129
120 << "falling back to cairo generated one";130 for (unsigned button = 0; button < window_buttons_.size(); ++button)
121131 {
122 cu::CairoContext ctx(BUTTONS_SIZE + BUTTONS_PADDING*2, BUTTONS_SIZE + BUTTONS_PADDING*2);132 for (unsigned state = 0; state < window_buttons_[button].size(); ++state)
123 cairo_translate(ctx, BUTTONS_PADDING, BUTTONS_PADDING);133 {
124 style->DrawWindowButton(WindowButtonType(button), WidgetState(state), ctx, BUTTONS_SIZE, BUTTONS_SIZE);134 glib::Error error;
125 window_buttons_[button][state] = ctx;135 auto const& file = style->WindowButtonFile(WindowButtonType(button), WidgetState(state));
136 gdk_pixbuf_get_file_info(file.c_str(), &size.width, &size.height);
137
138 size.width = std::round(size.width * scale);
139 size.height = std::round(size.height * scale);
140 glib::Object<GdkPixbuf> pixbuf(gdk_pixbuf_new_from_file_at_size(file.c_str(), size.width, size.height, &error));
141
142 if (pixbuf)
143 {
144 LOG_DEBUG(logger) << "Loading texture " << file;
145 cu::CairoContext ctx(size.width, size.height);
146 gdk_cairo_set_source_pixbuf(ctx, pixbuf, 0, 0);
147 cairo_paint(ctx);
148 destination[button][state] = ctx;
149 }
150 else
151 {
152 LOG_WARN(logger) << "Impossible to load local button texture file: "
153 << error << "; falling back to cairo generated one.";
154
155 int button_size = std::round((BUTTONS_SIZE + BUTTONS_PADDING * 2) * scale);
156 cu::CairoContext ctx(button_size, button_size, scale);
157 cairo_translate(ctx, BUTTONS_PADDING, BUTTONS_PADDING);
158 style->DrawWindowButton(WindowButtonType(button), WidgetState(state), ctx, BUTTONS_SIZE, BUTTONS_SIZE);
159 destination[button][state] = ctx;
160 }
126 }161 }
127 }162 }
128 }163 }
129
130 CompSize glow_size(texture::GLOW_SIZE, texture::GLOW_SIZE);
131 glow_texture_ = std::make_shared<cu::SimpleTexture>(GLTexture::imageDataToTexture(texture::GLOW, glow_size, GL_RGBA, GL_UNSIGNED_BYTE));
132}164}
133165
134cu::SimpleTexture::Ptr const& DataPool::GlowTexture() const166cu::SimpleTexture::Ptr const& DataPool::GlowTexture() const
@@ -149,5 +181,26 @@
149 return window_buttons_[unsigned(wbt)][unsigned(ws)];181 return window_buttons_[unsigned(wbt)][unsigned(ws)];
150}182}
151183
184cu::SimpleTexture::Ptr const& DataPool::ButtonTexture(double scale, WindowButtonType wbt, WidgetState ws) const
185{
186 if (wbt >= WindowButtonType::Size || ws >= WidgetState::Size)
187 {
188 LOG_ERROR(logger) << "It has been requested an invalid button texture "
189 << "WindowButtonType: " << unsigned(wbt) << ", WidgetState: "
190 << unsigned(ws);
191 return EMPTY_BUTTON;
192 }
193
194 if (scale == 1.0f)
195 return window_buttons_[unsigned(wbt)][unsigned(ws)];
196
197 auto it = scaled_window_buttons_.find(scale);
198
199 if (it == scaled_window_buttons_.end())
200 return EMPTY_BUTTON;
201
202 return it->second[unsigned(wbt)][unsigned(ws)];
203}
204
152} // decoration namespace205} // decoration namespace
153} // unity namespace206} // unity namespace
154207
=== modified file 'decorations/DecorationsDataPool.h'
--- decorations/DecorationsDataPool.h 2014-01-16 17:43:36 +0000
+++ decorations/DecorationsDataPool.h 2014-03-03 11:01:22 +0000
@@ -20,6 +20,7 @@
20#ifndef UNITY_DECORATIONS_DATA_POOL20#ifndef UNITY_DECORATIONS_DATA_POOL
21#define UNITY_DECORATIONS_DATA_POOL21#define UNITY_DECORATIONS_DATA_POOL
2222
23#include <unordered_map>
23#include "DecorationStyle.h"24#include "DecorationStyle.h"
24#include "DecorationsEdge.h"25#include "DecorationsEdge.h"
2526
@@ -39,6 +40,7 @@
39 Cursor EdgeCursor(Edge::Type) const;40 Cursor EdgeCursor(Edge::Type) const;
40 cu::SimpleTexture::Ptr const& GlowTexture() const;41 cu::SimpleTexture::Ptr const& GlowTexture() const;
41 cu::SimpleTexture::Ptr const& ButtonTexture(WindowButtonType, WidgetState) const;42 cu::SimpleTexture::Ptr const& ButtonTexture(WindowButtonType, WidgetState) const;
43 cu::SimpleTexture::Ptr const& ButtonTexture(double scale, WindowButtonType, WidgetState) const;
4244
43private:45private:
44 DataPool();46 DataPool();
@@ -50,7 +52,10 @@
5052
51 std::array<Cursor, size_t(Edge::Type::Size)> edge_cursors_;53 std::array<Cursor, size_t(Edge::Type::Size)> edge_cursors_;
52 cu::SimpleTexture::Ptr glow_texture_;54 cu::SimpleTexture::Ptr glow_texture_;
53 std::array<std::array<cu::SimpleTexture::Ptr, size_t(WidgetState::Size)>, size_t(WindowButtonType::Size)> window_buttons_;55
56 typedef std::array<std::array<cu::SimpleTexture::Ptr, size_t(WidgetState::Size)>, size_t(WindowButtonType::Size)> WindowButtonsArray;
57 WindowButtonsArray window_buttons_;
58 std::unordered_map<double, WindowButtonsArray> scaled_window_buttons_;
54};59};
5560
56} // decoration namespace61} // decoration namespace
5762
=== modified file 'decorations/DecorationsMenuDropdown.cpp'
--- decorations/DecorationsMenuDropdown.cpp 2014-02-13 00:48:21 +0000
+++ decorations/DecorationsMenuDropdown.cpp 2014-03-03 11:01:22 +0000
@@ -75,15 +75,12 @@
75 if (std::find(children_.begin(), children_.end(), child) != children_.end())75 if (std::find(children_.begin(), children_.end(), child) != children_.end())
76 return;76 return;
7777
78 if (children_.empty())78 int size_diff = (child->GetNaturalHeight() - GetNaturalHeight()) / scale();
79
80 if (size_diff > 0)
79 {81 {
80 int size_diff = child->GetNaturalHeight() - GetNaturalHeight();82 natural_.height += (size_diff % 2);
8183 vertical_padding = vertical_padding() + (size_diff / 2);
82 if (size_diff > 0)
83 {
84 natural_.height += (size_diff % 2);
85 vertical_padding = vertical_padding() + (size_diff / 2);
86 }
87 }84 }
8885
89 children_.push_front(child);86 children_.push_front(child);
@@ -122,14 +119,17 @@
122void MenuDropdown::RenderTexture()119void MenuDropdown::RenderTexture()
123{120{
124 WidgetState state = active() ? WidgetState::PRELIGHT : WidgetState::NORMAL;121 WidgetState state = active() ? WidgetState::PRELIGHT : WidgetState::NORMAL;
125 cu::CairoContext icon_ctx(GetNaturalWidth(), GetNaturalHeight());122 cu::CairoContext icon_ctx(GetNaturalWidth(), GetNaturalHeight(), scale());
126123
127 if (state == WidgetState::PRELIGHT)124 if (state == WidgetState::PRELIGHT)
128 Style::Get()->DrawMenuItem(state, icon_ctx, icon_ctx.width(), icon_ctx.height());125 Style::Get()->DrawMenuItem(state, icon_ctx, icon_ctx.width() / scale(), icon_ctx.height() / scale());
129126
130 cairo_save(icon_ctx);127 cairo_save(icon_ctx);
131 cairo_translate(icon_ctx, horizontal_padding(), vertical_padding());128 cairo_translate(icon_ctx, horizontal_padding(), vertical_padding());
132 Style::Get()->DrawMenuItemIcon(ICON_NAME, state, icon_ctx, ICON_SIZE);129 cairo_save(icon_ctx);
130 cairo_scale(icon_ctx, 1.0f/scale(), 1.0f/scale());
131 Style::Get()->DrawMenuItemIcon(ICON_NAME, state, icon_ctx, ICON_SIZE * scale());
132 cairo_restore(icon_ctx);
133 cairo_restore(icon_ctx);133 cairo_restore(icon_ctx);
134 SetTexture(icon_ctx);134 SetTexture(icon_ctx);
135}135}
136136
=== modified file 'decorations/DecorationsMenuEntry.cpp'
--- decorations/DecorationsMenuEntry.cpp 2014-02-14 19:01:49 +0000
+++ decorations/DecorationsMenuEntry.cpp 2014-03-03 11:01:22 +0000
@@ -41,6 +41,7 @@
41 entry_->updated.connect(sigc::mem_fun(this, &MenuEntry::EntryUpdated));41 entry_->updated.connect(sigc::mem_fun(this, &MenuEntry::EntryUpdated));
42 horizontal_padding.changed.connect(sigc::hide(sigc::mem_fun(this, &MenuEntry::RenderTexture)));42 horizontal_padding.changed.connect(sigc::hide(sigc::mem_fun(this, &MenuEntry::RenderTexture)));
43 vertical_padding.changed.connect(sigc::hide(sigc::mem_fun(this, &MenuEntry::RenderTexture)));43 vertical_padding.changed.connect(sigc::hide(sigc::mem_fun(this, &MenuEntry::RenderTexture)));
44 scale.changed.connect(sigc::hide(sigc::mem_fun(this, &MenuEntry::RenderTexture)));
44 in_dropdown.changed.connect([this] (bool in) { visible = entry_->visible() && !in; });45 in_dropdown.changed.connect([this] (bool in) { visible = entry_->visible() && !in; });
45 EntryUpdated();46 EntryUpdated();
46}47}
@@ -71,10 +72,10 @@
71 state = WidgetState::PRELIGHT;72 state = WidgetState::PRELIGHT;
7273
73 natural_ = Style::Get()->MenuItemNaturalSize(entry_->label());74 natural_ = Style::Get()->MenuItemNaturalSize(entry_->label());
74 cu::CairoContext text_ctx(GetNaturalWidth(), GetNaturalHeight());75 cu::CairoContext text_ctx(GetNaturalWidth(), GetNaturalHeight(), scale());
7576
76 if (state == WidgetState::PRELIGHT)77 if (state == WidgetState::PRELIGHT)
77 Style::Get()->DrawMenuItem(state, text_ctx, text_ctx.width(), text_ctx.height());78 Style::Get()->DrawMenuItem(state, text_ctx, text_ctx.width() / scale(), text_ctx.height() / scale());
7879
79 cairo_save(text_ctx);80 cairo_save(text_ctx);
80 cairo_translate(text_ctx, horizontal_padding(), vertical_padding());81 cairo_translate(text_ctx, horizontal_padding(), vertical_padding());
@@ -95,12 +96,12 @@
9596
96int MenuEntry::GetNaturalWidth() const97int MenuEntry::GetNaturalWidth() const
97{98{
98 return natural_.width + horizontal_padding() * 2;99 return (natural_.width + horizontal_padding() * 2) * scale();
99}100}
100101
101int MenuEntry::GetNaturalHeight() const102int MenuEntry::GetNaturalHeight() const
102{103{
103 return natural_.height + vertical_padding() * 2;104 return (natural_.height + vertical_padding() * 2) * scale();
104}105}
105106
106void MenuEntry::ButtonDownEvent(CompPoint const& p, unsigned button, Time timestamp)107void MenuEntry::ButtonDownEvent(CompPoint const& p, unsigned button, Time timestamp)
107108
=== modified file 'decorations/DecorationsMenuLayout.cpp'
--- decorations/DecorationsMenuLayout.cpp 2014-02-13 03:33:02 +0000
+++ decorations/DecorationsMenuLayout.cpp 2014-03-03 11:01:22 +0000
@@ -63,6 +63,7 @@
63 menu->active.changed.connect(active_cb);63 menu->active.changed.connect(active_cb);
64 menu->show_now.changed.connect(show_now_cb);64 menu->show_now.changed.connect(show_now_cb);
65 menu->focused = focused();65 menu->focused = focused();
66 menu->scale = scale();
66 menu->SetParent(shared_from_this());67 menu->SetParent(shared_from_this());
67 items_.push_back(menu);68 items_.push_back(menu);
68 }69 }
@@ -185,8 +186,13 @@
185186
186void MenuLayout::DoRelayout()187void MenuLayout::DoRelayout()
187{188{
189 float scale = this->scale();
190 int inner_padding = this->inner_padding().CP(scale);
191 int left_padding = this->left_padding().CP(scale);
192 int right_padding = this->right_padding().CP(scale);
193
188 int dropdown_width = dropdown_->GetNaturalWidth();194 int dropdown_width = dropdown_->GetNaturalWidth();
189 int accumolated_width = dropdown_width + left_padding() + right_padding() - inner_padding();195 int accumolated_width = dropdown_width + left_padding + right_padding - inner_padding;
190 int max_width = max_.width;196 int max_width = max_.width;
191 std::list<MenuEntry::Ptr> to_hide;197 std::list<MenuEntry::Ptr> to_hide;
192198
@@ -195,7 +201,7 @@
195 if (!item->visible() || item == dropdown_)201 if (!item->visible() || item == dropdown_)
196 continue;202 continue;
197203
198 accumolated_width += item->GetNaturalWidth() + inner_padding();204 accumolated_width += item->GetNaturalWidth() + inner_padding;
199205
200 if (accumolated_width > max_width)206 if (accumolated_width > max_width)
201 to_hide.push_front(std::static_pointer_cast<MenuEntry>(item));207 to_hide.push_front(std::static_pointer_cast<MenuEntry>(item));
202208
=== modified file 'decorations/DecorationsPriv.h'
--- decorations/DecorationsPriv.h 2014-02-19 02:16:22 +0000
+++ decorations/DecorationsPriv.h 2014-03-03 11:01:22 +0000
@@ -126,6 +126,7 @@
126 nux::Geometry frame_geo_;126 nux::Geometry frame_geo_;
127 CompRegion frame_region_;127 CompRegion frame_region_;
128 connection::Wrapper theme_changed_;128 connection::Wrapper theme_changed_;
129 connection::Wrapper dpi_changed_;
129 connection::Wrapper grab_mouse_changed_;130 connection::Wrapper grab_mouse_changed_;
130 std::string last_title_;131 std::string last_title_;
131 std::vector<cu::SimpleTextureQuad> bg_textures_;132 std::vector<cu::SimpleTextureQuad> bg_textures_;
132133
=== modified file 'decorations/DecorationsSlidingLayout.cpp'
--- decorations/DecorationsSlidingLayout.cpp 2014-02-19 00:01:16 +0000
+++ decorations/DecorationsSlidingLayout.cpp 2014-03-03 11:01:22 +0000
@@ -88,6 +88,7 @@
88 {88 {
89 input_item_->SetParent(shared_from_this());89 input_item_->SetParent(shared_from_this());
90 input_item_->focused = focused();90 input_item_->focused = focused();
91 input_item_->scale = scale();
91 }92 }
9293
93 Relayout();94 Relayout();
9495
=== modified file 'decorations/DecorationsTitle.cpp'
--- decorations/DecorationsTitle.cpp 2014-01-20 18:10:44 +0000
+++ decorations/DecorationsTitle.cpp 2014-03-03 11:01:22 +0000
@@ -30,6 +30,7 @@
30{30{
31 text.changed.connect(sigc::mem_fun(this, &Title::OnTextChanged));31 text.changed.connect(sigc::mem_fun(this, &Title::OnTextChanged));
32 focused.changed.connect(sigc::hide(sigc::mem_fun(this, &Title::RenderTexture)));32 focused.changed.connect(sigc::hide(sigc::mem_fun(this, &Title::RenderTexture)));
33 scale.changed.connect([this] (double) { text.changed.emit(text()); });
33 Style::Get()->title_font.changed.connect(sigc::mem_fun(this, &Title::OnFontChanged));34 Style::Get()->title_font.changed.connect(sigc::mem_fun(this, &Title::OnFontChanged));
34}35}
3536
@@ -37,6 +38,8 @@
37{38{
38 bool damaged = false;39 bool damaged = false;
39 auto real_size = Style::Get()->TitleNaturalSize(new_text);40 auto real_size = Style::Get()->TitleNaturalSize(new_text);
41 real_size.width *= scale();
42 real_size.height *= scale();
4043
41 if (GetNaturalWidth() > real_size.width || GetNaturalHeight() > real_size.height)44 if (GetNaturalWidth() > real_size.width || GetNaturalHeight() > real_size.height)
42 {45 {
@@ -59,8 +62,8 @@
59void Title::RenderTexture()62void Title::RenderTexture()
60{63{
61 auto state = focused() ? WidgetState::NORMAL : WidgetState::BACKDROP;64 auto state = focused() ? WidgetState::NORMAL : WidgetState::BACKDROP;
62 cu::CairoContext text_ctx(texture_size_.width, texture_size_.height);65 cu::CairoContext text_ctx(texture_size_.width, texture_size_.height, scale());
63 Style::Get()->DrawTitle(text(), state, text_ctx, texture_size_.width, texture_size_.height);66 Style::Get()->DrawTitle(text(), state, text_ctx, texture_size_.width / scale(), texture_size_.height / scale());
64 SetTexture(text_ctx);67 SetTexture(text_ctx);
65}68}
6669
6770
=== modified file 'decorations/DecorationsWidgets.cpp'
--- decorations/DecorationsWidgets.cpp 2014-02-19 00:01:16 +0000
+++ decorations/DecorationsWidgets.cpp 2014-03-03 11:01:22 +0000
@@ -226,17 +226,6 @@
226226
227//227//
228228
229TexturedItem::TexturedItem()
230{
231 scale.changed.connect([this] (float s) {
232 if (texture_.SetScale(s))
233 {
234 geo_parameters_changed.emit();
235 Damage();
236 }
237 });
238}
239
240void TexturedItem::SetTexture(cu::SimpleTexture::Ptr const& tex)229void TexturedItem::SetTexture(cu::SimpleTexture::Ptr const& tex)
241{230{
242 auto prev_geo = Geometry();231 auto prev_geo = Geometry();
@@ -274,12 +263,12 @@
274263
275int TexturedItem::GetNaturalWidth() const264int TexturedItem::GetNaturalWidth() const
276{265{
277 return (texture_) ? texture_.st->width() * scale() : Item::GetNaturalWidth();266 return (texture_) ? texture_.st->width() : Item::GetNaturalWidth();
278}267}
279268
280int TexturedItem::GetNaturalHeight() const269int TexturedItem::GetNaturalHeight() const
281{270{
282 return (texture_) ? texture_.st->height() * scale() : Item::GetNaturalHeight();271 return (texture_) ? texture_.st->height() : Item::GetNaturalHeight();
283}272}
284273
285CompRect& TexturedItem::InternalGeo()274CompRect& TexturedItem::InternalGeo()
@@ -387,8 +376,14 @@
387376
388CompRect Layout::ContentGeometry() const377CompRect Layout::ContentGeometry() const
389{378{
390 return CompRect(rect_.x() + min(left_padding(), rect_.width()),379 float scale = this->scale();
391 rect_.y() + min(top_padding(), rect_.height()),380 int left_padding = this->left_padding().CP(scale);
381 int right_padding = this->right_padding().CP(scale);
382 int top_padding = this->top_padding().CP(scale);
383 int bottom_padding = this->bottom_padding().CP(scale);
384
385 return CompRect(rect_.x() + min(left_padding, rect_.width()),
386 rect_.y() + min(top_padding, rect_.height()),
392 clamp_size(rect_.width() - left_padding - right_padding),387 clamp_size(rect_.width() - left_padding - right_padding),
393 clamp_size(rect_.height() - top_padding - bottom_padding));388 clamp_size(rect_.height() - top_padding - bottom_padding));
394}389}
@@ -396,13 +391,19 @@
396void Layout::DoRelayout()391void Layout::DoRelayout()
397{392{
398 int loop = 0;393 int loop = 0;
394 float scale = this->scale();
395 int inner_padding = this->inner_padding().CP(scale);
396 int left_padding = this->left_padding().CP(scale);
397 int right_padding = this->right_padding().CP(scale);
398 int top_padding = this->top_padding().CP(scale);
399 int bottom_padding = this->bottom_padding().CP(scale);
399400
400 nux::Size available_space(clamp_size(max_.width - left_padding - right_padding),401 nux::Size available_space(clamp_size(max_.width - left_padding - right_padding),
401 clamp_size(max_.height - top_padding - bottom_padding));402 clamp_size(max_.height - top_padding - bottom_padding));
402403
403 do404 do
404 {405 {
405 nux::Size content(min(left_padding(), max_.width), 0);406 nux::Size content(min(left_padding, max_.width), 0);
406407
407 for (auto const& item : items_)408 for (auto const& item : items_)
408 {409 {
@@ -428,7 +429,7 @@
428 if (!items_.empty() && content.width > inner_padding)429 if (!items_.empty() && content.width > inner_padding)
429 content.width -= inner_padding;430 content.width -= inner_padding;
430431
431 int actual_right_padding = max(0, min(right_padding(), max_.width - content.width));432 int actual_right_padding = max(0, min(right_padding, max_.width - content.width));
432 int vertical_padding = top_padding + bottom_padding;433 int vertical_padding = top_padding + bottom_padding;
433434
434 content.width += actual_right_padding;435 content.width += actual_right_padding;
@@ -490,7 +491,7 @@
490 }491 }
491}492}
492493
493bool Layout::SetPadding(int& target, int new_value)494bool Layout::SetPadding(RawPixel& target, RawPixel const& new_value)
494{495{
495 int padding = clamp_size(new_value);496 int padding = clamp_size(new_value);
496497
497498
=== modified file 'decorations/DecorationsWidgets.h'
--- decorations/DecorationsWidgets.h 2014-02-19 00:01:16 +0000
+++ decorations/DecorationsWidgets.h 2014-03-03 11:01:22 +0000
@@ -26,6 +26,7 @@
26#include <UnityCore/UWeakPtr.h>26#include <UnityCore/UWeakPtr.h>
27#include "Introspectable.h"27#include "Introspectable.h"
28#include "CompizUtils.h"28#include "CompizUtils.h"
29#include "RawPixel.h"
2930
30namespace unity31namespace unity
31{32{
@@ -49,7 +50,7 @@
49 nux::Property<bool> focused;50 nux::Property<bool> focused;
50 nux::Property<bool> sensitive;51 nux::Property<bool> sensitive;
51 nux::Property<bool> mouse_owner;52 nux::Property<bool> mouse_owner;
52 nux::Property<float> scale;53 nux::Property<double> scale;
5354
54 CompRect const& Geometry() const;55 CompRect const& Geometry() const;
55 virtual int GetNaturalWidth() const;56 virtual int GetNaturalWidth() const;
@@ -120,8 +121,6 @@
120public:121public:
121 typedef std::shared_ptr<TexturedItem> Ptr;122 typedef std::shared_ptr<TexturedItem> Ptr;
122123
123 TexturedItem();
124
125 void SetTexture(cu::SimpleTexture::Ptr const&);124 void SetTexture(cu::SimpleTexture::Ptr const&);
126 void Draw(GLWindow*, GLMatrix const&, GLWindowPaintAttrib const&, CompRegion const&, unsigned mask);125 void Draw(GLWindow*, GLMatrix const&, GLWindowPaintAttrib const&, CompRegion const&, unsigned mask);
127 void SetCoords(int x, int y);126 void SetCoords(int x, int y);
@@ -171,11 +170,11 @@
171170
172 Layout();171 Layout();
173172
174 nux::Property<int> inner_padding;173 nux::Property<RawPixel> inner_padding;
175 nux::Property<int> left_padding;174 nux::Property<RawPixel> left_padding;
176 nux::Property<int> right_padding;175 nux::Property<RawPixel> right_padding;
177 nux::Property<int> top_padding;176 nux::Property<RawPixel> top_padding;
178 nux::Property<int> bottom_padding;177 nux::Property<RawPixel> bottom_padding;
179178
180 void Append(Item::Ptr const&);179 void Append(Item::Ptr const&);
181 void Remove(Item::Ptr const&);180 void Remove(Item::Ptr const&);
@@ -189,7 +188,7 @@
189 void DoRelayout();188 void DoRelayout();
190189
191private:190private:
192 bool SetPadding(int& target, int new_value);191 bool SetPadding(RawPixel& target, RawPixel const& new_value);
193};192};
194193
195} // decoration namespace194} // decoration namespace
196195
=== modified file 'decorations/DecorationsWindowButton.cpp'
--- decorations/DecorationsWindowButton.cpp 2014-02-19 02:16:22 +0000
+++ decorations/DecorationsWindowButton.cpp 2014-03-03 11:01:22 +0000
@@ -38,12 +38,13 @@
38 auto cb = sigc::hide(sigc::mem_fun(this, &WindowButton::UpdateTexture));38 auto cb = sigc::hide(sigc::mem_fun(this, &WindowButton::UpdateTexture));
39 mouse_owner.changed.connect(cb);39 mouse_owner.changed.connect(cb);
40 focused.changed.connect(cb);40 focused.changed.connect(cb);
41 scale.changed.connect(cb);
41 UpdateTexture();42 UpdateTexture();
42}43}
4344
44void WindowButton::UpdateTexture()45void WindowButton::UpdateTexture()
45{46{
46 SetTexture(DataPool::Get()->ButtonTexture(type_, GetCurrentState()));47 SetTexture(DataPool::Get()->ButtonTexture(scale(), type_, GetCurrentState()));
47}48}
4849
49WidgetState WindowButton::GetCurrentState() const50WidgetState WindowButton::GetCurrentState() const
5051
=== modified file 'hud/HudController.cpp'
--- hud/HudController.cpp 2014-02-17 17:55:29 +0000
+++ hud/HudController.cpp 2014-03-03 11:01:22 +0000
@@ -76,7 +76,7 @@
76 }76 }
7777
78 SetupWindow();78 SetupWindow();
79 UScreen::GetDefault()->changed.connect([this] (int, std::vector<nux::Geometry>&) { Relayout(true); });79 UScreen::GetDefault()->changed.connect([this] (int, std::vector<nux::Geometry> const&) { Relayout(true); });
8080
81 ubus.RegisterInterest(UBUS_HUD_CLOSE_REQUEST, sigc::mem_fun(this, &Controller::OnExternalHideHud));81 ubus.RegisterInterest(UBUS_HUD_CLOSE_REQUEST, sigc::mem_fun(this, &Controller::OnExternalHideHud));
8282
8383
=== modified file 'launcher/CairoBaseWindow.cpp'
--- launcher/CairoBaseWindow.cpp 2014-02-19 14:01:02 +0000
+++ launcher/CairoBaseWindow.cpp 2014-03-03 11:01:22 +0000
@@ -54,7 +54,10 @@
54 fade_animator_.updated.connect(sigc::mem_fun(this, &BaseWindow::SetOpacity));54 fade_animator_.updated.connect(sigc::mem_fun(this, &BaseWindow::SetOpacity));
55 fade_animator_.finished.connect([this] {55 fade_animator_.finished.connect([this] {
56 if (animation::GetDirection(fade_animator_) == animation::Direction::BACKWARD)56 if (animation::GetDirection(fade_animator_) == animation::Direction::BACKWARD)
57 {
57 ShowWindow(false);58 ShowWindow(false);
59 hidden.emit();
60 }
58 });61 });
59}62}
6063
6164
=== modified file 'launcher/CairoBaseWindow.h'
--- launcher/CairoBaseWindow.h 2014-02-19 14:01:02 +0000
+++ launcher/CairoBaseWindow.h 2014-03-03 11:01:22 +0000
@@ -32,7 +32,6 @@
32 NUX_DECLARE_OBJECT_TYPE(CairoBaseWindow, nux::BaseWindow);32 NUX_DECLARE_OBJECT_TYPE(CairoBaseWindow, nux::BaseWindow);
33public:33public:
34 CairoBaseWindow(int monitor = 0);34 CairoBaseWindow(int monitor = 0);
35 virtual ~CairoBaseWindow() = default;
3635
37 virtual void Show();36 virtual void Show();
38 virtual void Hide();37 virtual void Hide();
@@ -40,6 +39,8 @@
40 void RedrawBlur();39 void RedrawBlur();
41 bool HasBlurredBackground() const;40 bool HasBlurredBackground() const;
4241
42 sigc::signal<void> hidden;
43
43protected:44protected:
44 void Draw(nux::GraphicsEngine& gfxContext, bool forceDraw);45 void Draw(nux::GraphicsEngine& gfxContext, bool forceDraw);
4546
4647
=== modified file 'launcher/EdgeBarrierController.cpp'
--- launcher/EdgeBarrierController.cpp 2013-11-14 03:00:29 +0000
+++ launcher/EdgeBarrierController.cpp 2014-03-03 11:01:22 +0000
@@ -87,7 +87,7 @@
87 ResizeBarrierList(monitors);87 ResizeBarrierList(monitors);
8888
89 /* FIXME: Back to c++11 lambda once we get sigc::track_obj.89 /* FIXME: Back to c++11 lambda once we get sigc::track_obj.
90 uscreen->changed.connect(sigc::track_obj(([this](int primary, std::vector<nux::Geometry>& layout) {90 uscreen->changed.connect(sigc::track_obj(([this](int primary, std::vector<nux::Geometry> const& layout) {
91 ResizeBarrierList(layout);91 ResizeBarrierList(layout);
92 SetupBarriers(layout);92 SetupBarriers(layout);
93 }));*/93 }));*/
@@ -123,7 +123,7 @@
123 nux::GetGraphicsDisplay()->RemoveEventFilter(this);123 nux::GetGraphicsDisplay()->RemoveEventFilter(this);
124}124}
125125
126void EdgeBarrierController::Impl::OnUScreenChanged(int primary, std::vector<nux::Geometry>& layout)126void EdgeBarrierController::Impl::OnUScreenChanged(int primary, std::vector<nux::Geometry> const& layout)
127{127{
128 ResizeBarrierList(layout);128 ResizeBarrierList(layout);
129 SetupBarriers(layout);129 SetupBarriers(layout);
130130
=== modified file 'launcher/EdgeBarrierControllerPrivate.h'
--- launcher/EdgeBarrierControllerPrivate.h 2013-09-23 20:07:45 +0000
+++ launcher/EdgeBarrierControllerPrivate.h 2014-03-03 11:01:22 +0000
@@ -41,7 +41,7 @@
41 void ResizeBarrierList(std::vector<nux::Geometry> const& layout);41 void ResizeBarrierList(std::vector<nux::Geometry> const& layout);
42 void SetupBarriers(std::vector<nux::Geometry> const& layout);42 void SetupBarriers(std::vector<nux::Geometry> const& layout);
4343
44 void OnUScreenChanged(int primary, std::vector<nux::Geometry>& layout);44 void OnUScreenChanged(int primary, std::vector<nux::Geometry> const& layout);
45 void OnOptionsChanged();45 void OnOptionsChanged();
4646
47 void OnPointerBarrierEvent(PointerBarrierWrapper* owner, BarrierEvent::Ptr const& event);47 void OnPointerBarrierEvent(PointerBarrierWrapper* owner, BarrierEvent::Ptr const& event);
4848
=== modified file 'launcher/Launcher.cpp'
--- launcher/Launcher.cpp 2014-02-18 20:41:58 +0000
+++ launcher/Launcher.cpp 2014-03-03 11:01:22 +0000
@@ -145,9 +145,8 @@
145 , cv_(unity::Settings::Instance().em(monitor))145 , cv_(unity::Settings::Instance().em(monitor))
146{146{
147 icon_renderer_->monitor = monitor();147 icon_renderer_->monitor = monitor();
148 icon_renderer_->SetTargetSize(icon_size_.CP(cv_),148 icon_renderer_->scale = cv_->DPIScale();
149 DEFAULT_ICON_SIZE.CP(cv_),149 icon_renderer_->SetTargetSize(icon_size_.CP(cv_), DEFAULT_ICON_SIZE.CP(cv_), SPACE_BETWEEN_ICONS.CP(cv_));
150 SPACE_BETWEEN_ICONS.CP(cv_));
151150
152 CaptureMouseDownAnyWhereElse(true);151 CaptureMouseDownAnyWhereElse(true);
153 SetAcceptKeyNavFocusOnMouseDown(false);152 SetAcceptKeyNavFocusOnMouseDown(false);
@@ -254,7 +253,7 @@
254 .add("quicklist-open", hide_machine_.GetQuirk(LauncherHideMachine::QUICKLIST_OPEN))253 .add("quicklist-open", hide_machine_.GetQuirk(LauncherHideMachine::QUICKLIST_OPEN))
255 .add("hide-quirks", hide_machine_.DebugHideQuirks())254 .add("hide-quirks", hide_machine_.DebugHideQuirks())
256 .add("hover-quirks", hover_machine_.DebugHoverQuirks())255 .add("hover-quirks", hover_machine_.DebugHoverQuirks())
257 .add("icon-size", icon_size_)256 .add("icon-size", icon_size_.CP(cv_))
258 .add("shortcuts_shown", shortcuts_shown_)257 .add("shortcuts_shown", shortcuts_shown_)
259 .add("tooltip-shown", active_tooltip_ != nullptr);258 .add("tooltip-shown", active_tooltip_ != nullptr);
260}259}
@@ -330,7 +329,7 @@
330329
331void Launcher::OnDPIChanged()330void Launcher::OnDPIChanged()
332{331{
333 UpdateOptions(options());332 monitor.changed.emit(monitor());
334}333}
335334
336void Launcher::SetDndDelta(float x, float y, nux::Geometry const& geo)335void Launcher::SetDndDelta(float x, float y, nux::Geometry const& geo)
@@ -1200,11 +1199,11 @@
1200 unity::panel::Style &panel_style = panel::Style::Instance();1199 unity::panel::Style &panel_style = panel::Style::Instance();
1201 int panel_height = panel_style.PanelHeight(new_monitor);1200 int panel_height = panel_style.PanelHeight(new_monitor);
12021201
1203 Resize(nux::Point(monitor_geo.x, monitor_geo.y + panel_height),1202 cv_ = unity::Settings::Instance().em(monitor);
1204 monitor_geo.height - panel_height);1203 Resize(nux::Point(monitor_geo.x, monitor_geo.y + panel_height), monitor_geo.height - panel_height);
1204
1205 icon_renderer_->monitor = new_monitor;1205 icon_renderer_->monitor = new_monitor;
12061206 SetIconSize(options()->tile_size, options()->icon_size);
1207 cv_ = unity::Settings::Instance().em(monitor);
1208}1207}
12091208
1210void Launcher::UpdateOptions(Options::Ptr options)1209void Launcher::UpdateOptions(Options::Ptr options)
@@ -1492,11 +1491,9 @@
1492 ui::IconRenderer::DestroyShortcutTextures();1491 ui::IconRenderer::DestroyShortcutTextures();
14931492
1494 icon_size_ = tile_size;1493 icon_size_ = tile_size;
1495 icon_renderer_->SetTargetSize(icon_size_.CP(cv_),1494 icon_renderer_->scale = cv_->DPIScale();
1496 RawPixel(icon_size).CP(cv_),1495 icon_renderer_->SetTargetSize(icon_size_.CP(cv_), RawPixel(icon_size).CP(cv_), SPACE_BETWEEN_ICONS.CP(cv_));
1497 SPACE_BETWEEN_ICONS.CP(cv_));1496 AbstractLauncherIcon::icon_size = icon_size_;
1498
1499 AbstractLauncherIcon::icon_size = icon_size_.CP(cv_);
15001497
1501 nux::Geometry const& parent_geo = parent_->GetGeometry();1498 nux::Geometry const& parent_geo = parent_->GetGeometry();
1502 Resize(nux::Point(parent_geo.x, parent_geo.y), parent_geo.height);1499 Resize(nux::Point(parent_geo.x, parent_geo.y), parent_geo.height);
15031500
=== modified file 'launcher/LauncherController.cpp'
--- launcher/LauncherController.cpp 2014-02-26 21:27:13 +0000
+++ launcher/LauncherController.cpp 2014-03-03 11:01:22 +0000
@@ -127,7 +127,7 @@
127127
128 UScreen* uscreen = UScreen::GetDefault();128 UScreen* uscreen = UScreen::GetDefault();
129 EnsureLaunchers(uscreen->GetPrimaryMonitor(), uscreen->GetMonitors());129 EnsureLaunchers(uscreen->GetPrimaryMonitor(), uscreen->GetMonitors());
130130 uscreen->changed.connect(sigc::mem_fun(this, &Controller::Impl::EnsureLaunchers));
131 SetupIcons();131 SetupIcons();
132132
133 remote_model_.entry_added.connect(sigc::mem_fun(this, &Impl::OnLauncherEntryRemoteAdded));133 remote_model_.entry_added.connect(sigc::mem_fun(this, &Impl::OnLauncherEntryRemoteAdded));
@@ -149,8 +149,6 @@
149 hud->SetHideMode(mode);149 hud->SetHideMode(mode);
150 });150 });
151151
152 uscreen->changed.connect(sigc::mem_fun(this, &Controller::Impl::OnScreenChanged));
153
154 WindowManager& wm = WindowManager::Default();152 WindowManager& wm = WindowManager::Default();
155 wm.window_focus_changed.connect(sigc::mem_fun(this, &Controller::Impl::OnWindowFocusChanged));153 wm.window_focus_changed.connect(sigc::mem_fun(this, &Controller::Impl::OnWindowFocusChanged));
156 wm.viewport_layout_changed.connect(sigc::group(sigc::mem_fun(this, &Controller::Impl::UpdateNumWorkspaces), sigc::_1 * sigc::_2));154 wm.viewport_layout_changed.connect(sigc::group(sigc::mem_fun(this, &Controller::Impl::UpdateNumWorkspaces), sigc::_1 * sigc::_2));
@@ -171,8 +169,6 @@
171 }169 }
172 });170 });
173171
174 unity::Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &Controller::Impl::OnDPIChanged));
175
176 parent_->AddChild(model_.get());172 parent_->AddChild(model_.get());
177173
178 xdnd_manager_->dnd_started.connect(sigc::mem_fun(this, &Impl::OnDndStarted));174 xdnd_manager_->dnd_started.connect(sigc::mem_fun(this, &Impl::OnDndStarted));
@@ -254,11 +250,6 @@
254 launchers.resize(num_launchers);250 launchers.resize(num_launchers);
255}251}
256252
257void Controller::Impl::OnScreenChanged(int primary_monitor, std::vector<nux::Geometry>& monitors)
258{
259 EnsureLaunchers(primary_monitor, monitors);
260}
261
262void Controller::Impl::OnWindowFocusChanged(guint32 xid)253void Controller::Impl::OnWindowFocusChanged(guint32 xid)
263{254{
264 static bool keynav_first_focus = false;255 static bool keynav_first_focus = false;
@@ -553,22 +544,6 @@
553 }544 }
554}545}
555546
556void Controller::Impl::OnDPIChanged()
557{
558 for (auto const& launcher_ptr : launchers)
559 {
560 if (launcher_ptr)
561 {
562 nux::Geometry const& parent_geo = launcher_ptr->GetParent()->GetGeometry();
563 int monitor = launcher_ptr->monitor();
564 int height = panel::Style::Instance().PanelHeight(monitor);
565 int diff = height - parent_geo.y;
566
567 launcher_ptr->Resize(nux::Point(parent_geo.x, parent_geo.y + diff), parent_geo.height - diff);
568 }
569 }
570}
571
572void Controller::Impl::OnIconRemoved(AbstractLauncherIcon::Ptr const& icon)547void Controller::Impl::OnIconRemoved(AbstractLauncherIcon::Ptr const& icon)
573{548{
574 SortAndUpdate();549 SortAndUpdate();
575550
=== modified file 'launcher/LauncherControllerPrivate.h'
--- launcher/LauncherControllerPrivate.h 2014-02-18 20:22:05 +0000
+++ launcher/LauncherControllerPrivate.h 2014-03-03 11:01:22 +0000
@@ -98,8 +98,6 @@
9898
99 void EnsureLaunchers(int primary, std::vector<nux::Geometry> const& monitors);99 void EnsureLaunchers(int primary, std::vector<nux::Geometry> const& monitors);
100100
101 void OnScreenChanged(int primary_monitor, std::vector<nux::Geometry>& monitors);
102
103 void OnWindowFocusChanged (guint32 xid);101 void OnWindowFocusChanged (guint32 xid);
104102
105 void OnApplicationStarted(ApplicationPtr const& app);103 void OnApplicationStarted(ApplicationPtr const& app);
@@ -119,8 +117,6 @@
119 void OnDndMonitorChanged(std::string const& data, int old_monitor, int new_monitor);117 void OnDndMonitorChanged(std::string const& data, int old_monitor, int new_monitor);
120 GVariant* OnDBusMethodCall(std::string const& method, GVariant *parameters);118 GVariant* OnDBusMethodCall(std::string const& method, GVariant *parameters);
121119
122 void OnDPIChanged();
123
124 Controller* parent_;120 Controller* parent_;
125 LauncherModel::Ptr model_;121 LauncherModel::Ptr model_;
126 nux::ObjectPtr<Launcher> launcher_;122 nux::ObjectPtr<Launcher> launcher_;
127123
=== modified file 'launcher/LauncherIcon.cpp'
--- launcher/LauncherIcon.cpp 2014-02-19 02:16:22 +0000
+++ launcher/LauncherIcon.cpp 2014-03-03 11:01:22 +0000
@@ -99,9 +99,6 @@
99 mouse_up.connect(sigc::mem_fun(this, &LauncherIcon::RecvMouseUp));99 mouse_up.connect(sigc::mem_fun(this, &LauncherIcon::RecvMouseUp));
100 mouse_click.connect(sigc::mem_fun(this, &LauncherIcon::RecvMouseClick));100 mouse_click.connect(sigc::mem_fun(this, &LauncherIcon::RecvMouseClick));
101101
102 unity::Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &LauncherIcon::LoadTooltip));
103 unity::Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &LauncherIcon::LoadQuicklist));
104
105 for (unsigned i = 0; i < monitors::MAX; ++i)102 for (unsigned i = 0; i < monitors::MAX; ++i)
106 {103 {
107 for (unsigned j = 0; j < static_cast<unsigned>(Quirk::LAST); ++j)104 for (unsigned j = 0; j < static_cast<unsigned>(Quirk::LAST); ++j)
@@ -124,6 +121,7 @@
124 _tooltip = new Tooltip(monitor);121 _tooltip = new Tooltip(monitor);
125 _tooltip->SetOpacity(0.0f);122 _tooltip->SetOpacity(0.0f);
126 _tooltip->text = tooltip_text();123 _tooltip->text = tooltip_text();
124 _tooltip->hidden.connect([this] { _tooltip.Release(); });
127 debug::Introspectable::AddChild(_tooltip.GetPointer());125 debug::Introspectable::AddChild(_tooltip.GetPointer());
128}126}
129127
@@ -134,6 +132,7 @@
134 monitor = 0;132 monitor = 0;
135133
136 _quicklist = new QuicklistView(monitor);134 _quicklist = new QuicklistView(monitor);
135 _quicklist->hidden.connect([this] { _quicklist.Release(); });
137 debug::Introspectable::AddChild(_quicklist.GetPointer());136 debug::Introspectable::AddChild(_quicklist.GetPointer());
138137
139 _quicklist->mouse_down_outside_pointer_grab_area.connect([this] (int x, int y, unsigned long button_flags, unsigned long key_flags)138 _quicklist->mouse_down_outside_pointer_grab_area.connect([this] (int x, int y, unsigned long button_flags, unsigned long key_flags)
@@ -478,7 +477,8 @@
478477
479nux::Point LauncherIcon::GetTipPosition(int monitor) const478nux::Point LauncherIcon::GetTipPosition(int monitor) const
480{479{
481 return nux::Point(_center[monitor].x + icon_size()/2 + 1, _center[monitor].y);480 auto const& converter = Settings::Instance().em(monitor);
481 return nux::Point(_center[monitor].x + converter->CP(icon_size()) / 2 + 1, _center[monitor].y);
482}482}
483483
484void LauncherIcon::ShowTooltip()484void LauncherIcon::ShowTooltip()
@@ -514,20 +514,17 @@
514{514{
515 MenuItemsVector const& menus = Menus();515 MenuItemsVector const& menus = Menus();
516516
517 if (!_quicklist)
518 LoadQuicklist();
519
520 if (menus.empty())517 if (menus.empty())
521 return false;518 return false;
522519
520 LoadQuicklist();
521
523 if (_tooltip)522 if (_tooltip)
524 {523 {
525 // Hide the tooltip without fade animation524 // Hide the tooltip without fade animation
526 _tooltip->ShowWindow(false);525 _tooltip->ShowWindow(false);
527 }526 }
528527
529 _quicklist->RemoveAllMenuItem();
530
531 for (auto const& menu_item : menus)528 for (auto const& menu_item : menus)
532 {529 {
533 QuicklistMenuItem* ql_item = nullptr;530 QuicklistMenuItem* ql_item = nullptr;
534531
=== modified file 'launcher/QuicklistMenuItem.cpp'
--- launcher/QuicklistMenuItem.cpp 2014-02-13 10:14:20 +0000
+++ launcher/QuicklistMenuItem.cpp 2014-03-03 11:01:22 +0000
@@ -41,6 +41,7 @@
41 , _menu_item(item)41 , _menu_item(item)
42 , _activate_timestamp(0)42 , _activate_timestamp(0)
43 , _prelight(false)43 , _prelight(false)
44 , _scale(1.0f)
44{45{
45 mouse_up.connect(sigc::mem_fun(this, &QuicklistMenuItem::RecvMouseUp));46 mouse_up.connect(sigc::mem_fun(this, &QuicklistMenuItem::RecvMouseUp));
46 mouse_click.connect(sigc::mem_fun(this, &QuicklistMenuItem::RecvMouseClick));47 mouse_click.connect(sigc::mem_fun(this, &QuicklistMenuItem::RecvMouseClick));
@@ -198,15 +199,21 @@
198 sigMouseLeave.emit(this);199 sigMouseLeave.emit(this);
199}200}
200201
202void QuicklistMenuItem::UpdateTexture()
203{
204 auto const& geo = GetGeometry();
205 nux::CairoGraphics cairo(CAIRO_FORMAT_ARGB32, geo.width * _scale, geo.height * _scale);
206 cairo_surface_set_device_scale(cairo.GetSurface(), _scale, _scale);
207 UpdateTexture(cairo, geo.width / _scale, geo.height / _scale);
208}
209
201void QuicklistMenuItem::PreLayoutManagement()210void QuicklistMenuItem::PreLayoutManagement()
202{211{
203 _pre_layout_width = GetBaseWidth();212 _pre_layout_width = GetBaseWidth();
204 _pre_layout_height = GetBaseHeight();213 _pre_layout_height = GetBaseHeight();
205214
206 if (!_normalTexture[0])215 if (!_normalTexture[0])
207 {
208 UpdateTexture();216 UpdateTexture();
209 }
210217
211 View::PreLayoutManagement();218 View::PreLayoutManagement();
212}219}
@@ -277,7 +284,7 @@
277 return _text_extents;284 return _text_extents;
278}285}
279286
280void QuicklistMenuItem::DrawText(nux::CairoGraphics& cairo, int width, int height, nux::Color const& color)287void QuicklistMenuItem::DrawText(nux::CairoGraphics& cairo, double width, double height, nux::Color const& color)
281{288{
282 if (_text.empty())289 if (_text.empty())
283 return;290 return;
@@ -288,8 +295,7 @@
288 glib::String font_name;295 glib::String font_name;
289 g_object_get(settings, "gtk-font-name", &font_name, nullptr);296 g_object_get(settings, "gtk-font-name", &font_name, nullptr);
290297
291 std::shared_ptr<cairo_t> cairo_context(cairo.GetContext(), cairo_destroy);298 cairo_t* cr = cairo.GetInternalContext();
292 cairo_t* cr = cairo_context.get();
293 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);299 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
294 cairo_set_source_rgba(cr, color.red, color.blue, color.green, color.alpha);300 cairo_set_source_rgba(cr, color.red, color.blue, color.green, color.alpha);
295 cairo_set_font_options(cr, gdk_screen_get_font_options(screen));301 cairo_set_font_options(cr, gdk_screen_get_font_options(screen));
@@ -297,6 +303,7 @@
297 glib::Object<PangoLayout> layout(pango_cairo_create_layout(cr));303 glib::Object<PangoLayout> layout(pango_cairo_create_layout(cr));
298 std::shared_ptr<PangoFontDescription> desc(pango_font_description_from_string(font_name), pango_font_description_free);304 std::shared_ptr<PangoFontDescription> desc(pango_font_description_from_string(font_name), pango_font_description_free);
299 pango_layout_set_font_description(layout, desc.get());305 pango_layout_set_font_description(layout, desc.get());
306 pango_layout_set_height(layout, -1);
300 pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);307 pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
301308
302 if (IsMarkupAccelEnabled())309 if (IsMarkupAccelEnabled())
@@ -334,8 +341,8 @@
334 int text_width = log_rect.width / PANGO_SCALE;341 int text_width = log_rect.width / PANGO_SCALE;
335 int text_height = log_rect.height / PANGO_SCALE;342 int text_height = log_rect.height / PANGO_SCALE;
336343
337 _text_extents.width = text_width + ITEM_INDENT_ABS + 3 * ITEM_MARGIN;344 _text_extents.width = std::ceil((text_width + ITEM_INDENT_ABS + 3 * ITEM_MARGIN) * _scale);
338 _text_extents.height = text_height + 2 * ITEM_MARGIN;345 _text_extents.height = std::ceil((text_height + 2 * ITEM_MARGIN) * _scale);
339346
340 SetMinimumSize(_text_extents.width, _text_extents.height);347 SetMinimumSize(_text_extents.width, _text_extents.height);
341348
@@ -343,10 +350,9 @@
343 pango_cairo_show_layout(cr, layout);350 pango_cairo_show_layout(cr, layout);
344}351}
345352
346void QuicklistMenuItem::DrawPrelight(nux::CairoGraphics& cairo, int width, int height, nux::Color const& color)353void QuicklistMenuItem::DrawPrelight(nux::CairoGraphics& cairo, double width, double height, nux::Color const& color)
347{354{
348 std::shared_ptr<cairo_t> cairo_context(cairo.GetContext(), cairo_destroy);355 cairo_t* cr = cairo.GetInternalContext();
349 cairo_t* cr = cairo_context.get();
350356
351 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);357 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
352 cairo_set_source_rgba(cr, color.red, color.blue, color.green, color.alpha);358 cairo_set_source_rgba(cr, color.red, color.blue, color.green, color.alpha);
@@ -414,7 +420,7 @@
414 if (!_menu_item)420 if (!_menu_item)
415 return -1;421 return -1;
416422
417 return dbusmenu_menuitem_property_get_int(_menu_item, MAXIMUM_LABEL_WIDTH_PROPERTY);423 return std::ceil(dbusmenu_menuitem_property_get_int(_menu_item, MAXIMUM_LABEL_WIDTH_PROPERTY) * _scale);
418}424}
419425
420bool QuicklistMenuItem::IsOverlayQuicklist() const426bool QuicklistMenuItem::IsOverlayQuicklist() const
@@ -434,6 +440,22 @@
434 return _normalTexture[0]->GetWidth();440 return _normalTexture[0]->GetWidth();
435}441}
436442
443double QuicklistMenuItem::GetScale() const
444{
445 return _scale;
446}
447
448void QuicklistMenuItem::SetScale(double scale)
449{
450 if (scale == _scale)
451 return;
452
453 _scale = scale;
454 InitializeText();
455 UpdateTexture();
456 QueueDraw();
457}
458
437// Introspection459// Introspection
438460
439std::string QuicklistMenuItem::GetName() const461std::string QuicklistMenuItem::GetName() const
440462
=== modified file 'launcher/QuicklistMenuItem.h'
--- launcher/QuicklistMenuItem.h 2014-02-13 10:14:20 +0000
+++ launcher/QuicklistMenuItem.h 2014-03-03 11:01:22 +0000
@@ -49,6 +49,8 @@
49{49{
50 NUX_DECLARE_OBJECT_TYPE(QuicklistMenuItem, nux::View);50 NUX_DECLARE_OBJECT_TYPE(QuicklistMenuItem, nux::View);
51public:51public:
52 typedef nux::ObjectPtr<QuicklistMenuItem> Ptr;
53
52 QuicklistMenuItem(QuicklistMenuItemType type, glib::Object<DbusmenuMenuitem> const& item, NUX_FILE_LINE_PROTO);54 QuicklistMenuItem(QuicklistMenuItemType type, glib::Object<DbusmenuMenuitem> const& item, NUX_FILE_LINE_PROTO);
53 virtual ~QuicklistMenuItem();55 virtual ~QuicklistMenuItem();
5456
@@ -68,6 +70,9 @@
68 void SetMaxLabelWidth(int max_width);70 void SetMaxLabelWidth(int max_width);
69 int GetMaxLabelWidth() const;71 int GetMaxLabelWidth() const;
7072
73 virtual void SetScale(double);
74 double GetScale() const;
75
71 bool IsOverlayQuicklist() const;76 bool IsOverlayQuicklist() const;
7277
73 void Activate() const;78 void Activate() const;
@@ -76,7 +81,7 @@
76 bool IsSelected() const;81 bool IsSelected() const;
7782
78 nux::Size const& GetTextExtents() const;83 nux::Size const& GetTextExtents() const;
79 virtual void UpdateTexture() = 0;84 void UpdateTexture();
80 unsigned GetCairoSurfaceWidth() const;85 unsigned GetCairoSurfaceWidth() const;
8186
82 sigc::signal<void, QuicklistMenuItem*> sigTextChanged;87 sigc::signal<void, QuicklistMenuItem*> sigTextChanged;
@@ -117,9 +122,11 @@
117122
118 void PreLayoutManagement();123 void PreLayoutManagement();
119 long PostLayoutManagement(long layoutResult);124 long PostLayoutManagement(long layoutResult);
125
126 virtual void UpdateTexture(nux::CairoGraphics&, double width, double height) = 0;
120 void Draw(nux::GraphicsEngine& gfxContext, bool forceDraw);127 void Draw(nux::GraphicsEngine& gfxContext, bool forceDraw);
121 void DrawText(nux::CairoGraphics& cairo, int width, int height, nux::Color const& color);128 void DrawText(nux::CairoGraphics& cairo, double width, double height, nux::Color const& color);
122 void DrawPrelight(nux::CairoGraphics& cairo, int width, int height, nux::Color const& color);129 void DrawPrelight(nux::CairoGraphics& cairo, double width, double height, nux::Color const& color);
123130
124 nux::ObjectPtr<nux::BaseTexture> _normalTexture[2];131 nux::ObjectPtr<nux::BaseTexture> _normalTexture[2];
125 nux::ObjectPtr<nux::BaseTexture> _prelightTexture[2];132 nux::ObjectPtr<nux::BaseTexture> _prelightTexture[2];
@@ -129,6 +136,7 @@
129 bool _prelight;136 bool _prelight;
130 int _pre_layout_width;137 int _pre_layout_width;
131 int _pre_layout_height;138 int _pre_layout_height;
139 double _scale;
132 nux::Size _text_extents;140 nux::Size _text_extents;
133 std::string _text;141 std::string _text;
134};142};
135143
=== modified file 'launcher/QuicklistMenuItemCheckmark.cpp'
--- launcher/QuicklistMenuItemCheckmark.cpp 2012-08-30 18:14:19 +0000
+++ launcher/QuicklistMenuItemCheckmark.cpp 2014-03-03 11:01:22 +0000
@@ -41,14 +41,9 @@
41 return "QuicklistMenuItemCheckmark";41 return "QuicklistMenuItemCheckmark";
42}42}
4343
44void QuicklistMenuItemCheckmark::UpdateTexture()44void QuicklistMenuItemCheckmark::UpdateTexture(nux::CairoGraphics& cairoGraphics, double width, double height)
45{45{
46 int width = GetBaseWidth();46 cairo_t* cr = cairoGraphics.GetInternalContext();
47 int height = GetBaseHeight();
48
49 nux::CairoGraphics cairoGraphics(CAIRO_FORMAT_ARGB32, width, height);
50 std::shared_ptr<cairo_t> cairo_context(cairoGraphics.GetContext(), cairo_destroy);
51 cairo_t* cr = cairo_context.get();
5247
53 // draw normal, unchecked version48 // draw normal, unchecked version
54 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);49 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
5550
=== modified file 'launcher/QuicklistMenuItemCheckmark.h'
--- launcher/QuicklistMenuItemCheckmark.h 2012-08-15 02:51:33 +0000
+++ launcher/QuicklistMenuItemCheckmark.h 2014-03-03 11:01:22 +0000
@@ -36,7 +36,7 @@
36 std::string GetName() const;36 std::string GetName() const;
3737
38 virtual std::string GetDefaultText() const;38 virtual std::string GetDefaultText() const;
39 virtual void UpdateTexture();39 virtual void UpdateTexture(nux::CairoGraphics&, double width, double height);
40};40};
4141
42} // NAMESPACE42} // NAMESPACE
4343
=== modified file 'launcher/QuicklistMenuItemLabel.cpp'
--- launcher/QuicklistMenuItemLabel.cpp 2012-08-30 18:14:19 +0000
+++ launcher/QuicklistMenuItemLabel.cpp 2014-03-03 11:01:22 +0000
@@ -41,14 +41,9 @@
41 return "QuicklistMenuItemLabel";41 return "QuicklistMenuItemLabel";
42}42}
4343
44void QuicklistMenuItemLabel::UpdateTexture()44void QuicklistMenuItemLabel::UpdateTexture(nux::CairoGraphics& cairoGraphics, double width, double height)
45{45{
46 int width = GetBaseWidth();46 cairo_t* cr = cairoGraphics.GetInternalContext();
47 int height = GetBaseHeight();
48
49 nux::CairoGraphics cairoGraphics(CAIRO_FORMAT_ARGB32, width, height);
50 std::shared_ptr<cairo_t> cairo_context(cairoGraphics.GetContext(), cairo_destroy);
51 cairo_t* cr = cairo_context.get();
5247
53 // draw normal, unchecked version48 // draw normal, unchecked version
54 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);49 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
5550
=== modified file 'launcher/QuicklistMenuItemLabel.h'
--- launcher/QuicklistMenuItemLabel.h 2012-08-15 02:51:33 +0000
+++ launcher/QuicklistMenuItemLabel.h 2014-03-03 11:01:22 +0000
@@ -36,7 +36,7 @@
36 std::string GetName() const;36 std::string GetName() const;
3737
38 virtual std::string GetDefaultText() const;38 virtual std::string GetDefaultText() const;
39 virtual void UpdateTexture();39 virtual void UpdateTexture(nux::CairoGraphics&, double width, double height);
40};40};
4141
42} // NAMESPACE42} // NAMESPACE
4343
=== modified file 'launcher/QuicklistMenuItemRadio.cpp'
--- launcher/QuicklistMenuItemRadio.cpp 2012-08-30 18:14:19 +0000
+++ launcher/QuicklistMenuItemRadio.cpp 2014-03-03 11:01:22 +0000
@@ -40,14 +40,9 @@
40 return "QuicklistMenuItemRadio";40 return "QuicklistMenuItemRadio";
41}41}
4242
43void QuicklistMenuItemRadio::UpdateTexture()43void QuicklistMenuItemRadio::UpdateTexture(nux::CairoGraphics& cairoGraphics, double width, double height)
44{44{
45 int width = GetBaseWidth();45 cairo_t* cr = cairoGraphics.GetInternalContext();
46 int height = GetBaseHeight();
47
48 nux::CairoGraphics cairoGraphics(CAIRO_FORMAT_ARGB32, width, height);
49 std::shared_ptr<cairo_t> cairo_context(cairoGraphics.GetContext(), cairo_destroy);
50 cairo_t* cr = cairo_context.get();
5146
52 // draw normal, disabled version47 // draw normal, disabled version
53 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);48 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
5449
=== modified file 'launcher/QuicklistMenuItemRadio.h'
--- launcher/QuicklistMenuItemRadio.h 2012-08-15 02:51:33 +0000
+++ launcher/QuicklistMenuItemRadio.h 2014-03-03 11:01:22 +0000
@@ -35,7 +35,7 @@
35 std::string GetName() const;35 std::string GetName() const;
3636
37 virtual std::string GetDefaultText() const;37 virtual std::string GetDefaultText() const;
38 virtual void UpdateTexture();38 virtual void UpdateTexture(nux::CairoGraphics&, double width, double height);
39};39};
4040
41} //NAMESPACE41} //NAMESPACE
4242
=== modified file 'launcher/QuicklistMenuItemSeparator.cpp'
--- launcher/QuicklistMenuItemSeparator.cpp 2012-08-30 18:14:19 +0000
+++ launcher/QuicklistMenuItemSeparator.cpp 2014-03-03 11:01:22 +0000
@@ -19,18 +19,24 @@
19 */19 */
2020
21#include "unity-shared/CairoTexture.h"21#include "unity-shared/CairoTexture.h"
22#include "unity-shared/RawPixel.h"
22#include "QuicklistMenuItemSeparator.h"23#include "QuicklistMenuItemSeparator.h"
2324
24namespace unity25namespace unity
25{26{
27namespace
28{
29const RawPixel WIDTH = 64_em;
30const RawPixel HEIGHT = 7_em;
31}
2632
27QuicklistMenuItemSeparator::QuicklistMenuItemSeparator(glib::Object<DbusmenuMenuitem> const& item, NUX_FILE_LINE_DECL)33QuicklistMenuItemSeparator::QuicklistMenuItemSeparator(glib::Object<DbusmenuMenuitem> const& item, NUX_FILE_LINE_DECL)
28 : QuicklistMenuItem(QuicklistMenuItemType::SEPARATOR, item, NUX_FILE_LINE_PARAM)34 : QuicklistMenuItem(QuicklistMenuItemType::SEPARATOR, item, NUX_FILE_LINE_PARAM)
29 , _color(1.0f, 1.0f, 1.0f, 0.5f)35 , _color(1.0f, 1.0f, 1.0f, 0.5f)
30 , _premultiplied_color(0.5f, 0.5f, 0.5f, 0.5f)36 , _premultiplied_color(0.5f, 0.5f, 0.5f, 0.5f)
31{37{
32 SetMinimumHeight(7);38 SetMinimumWidth(WIDTH.CP(_scale));
33 SetBaseSize(64, 7);39 SetMinimumHeight(HEIGHT.CP(_scale));
34}40}
3541
36std::string QuicklistMenuItemSeparator::GetName() const42std::string QuicklistMenuItemSeparator::GetName() const
@@ -43,6 +49,13 @@
43 return false;49 return false;
44}50}
4551
52void QuicklistMenuItemSeparator::SetScale(double scale)
53{
54 QuicklistMenuItem::SetScale(scale);
55 SetMinimumWidth(WIDTH.CP(scale));
56 SetMinimumHeight(HEIGHT.CP(scale));
57}
58
46void QuicklistMenuItemSeparator::Draw(nux::GraphicsEngine& gfxContext, bool forceDraw)59void QuicklistMenuItemSeparator::Draw(nux::GraphicsEngine& gfxContext, bool forceDraw)
47{60{
48 // Check if the texture have been computed. If they haven't, exit the function.61 // Check if the texture have been computed. If they haven't, exit the function.
@@ -67,22 +80,17 @@
67 gfxContext.PopClippingRectangle();80 gfxContext.PopClippingRectangle();
68}81}
6982
70void QuicklistMenuItemSeparator::UpdateTexture()83void QuicklistMenuItemSeparator::UpdateTexture(nux::CairoGraphics& cairoGraphics, double width, double height)
71{84{
72 int width = GetBaseWidth();85 cairo_t* cr = cairoGraphics.GetInternalContext();
73 int height = GetBaseHeight();
74
75 nux::CairoGraphics cairoGraphics(CAIRO_FORMAT_ARGB32, width, height);
76 std::shared_ptr<cairo_t> cairo_context(cairoGraphics.GetContext(), cairo_destroy);
77 cairo_t* cr = cairo_context.get();
7886
79 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);87 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
80 cairo_set_source_rgba(cr, 0.0f, 0.0f, 0.0f, 0.0f);88 cairo_set_source_rgba(cr, 0.0f, 0.0f, 0.0f, 0.0f);
81 cairo_paint(cr);89 cairo_paint(cr);
82 cairo_set_source_rgba(cr, _color.red, _color.green, _color.blue, _color.alpha);90 cairo_set_source_rgba(cr, _color.red, _color.green, _color.blue, _color.alpha);
83 cairo_set_line_width(cr, 1.0f);91 cairo_set_line_width(cr, 1.0f);
84 cairo_move_to(cr, 0.0f, 3.5f);92 cairo_move_to(cr, 0.0f, height/2.0f);
85 cairo_line_to(cr, width, 3.5f);93 cairo_line_to(cr, width, height/2.0f);
86 cairo_stroke(cr);94 cairo_stroke(cr);
8795
88 _normalTexture[0].Adopt(texture_from_cairo_graphics(cairoGraphics));96 _normalTexture[0].Adopt(texture_from_cairo_graphics(cairoGraphics));
8997
=== modified file 'launcher/QuicklistMenuItemSeparator.h'
--- launcher/QuicklistMenuItemSeparator.h 2012-08-15 02:51:33 +0000
+++ launcher/QuicklistMenuItemSeparator.h 2014-03-03 11:01:22 +0000
@@ -37,7 +37,8 @@
37 void Draw(nux::GraphicsEngine& gfxContext, bool forceDraw);37 void Draw(nux::GraphicsEngine& gfxContext, bool forceDraw);
38 std::string GetName() const;38 std::string GetName() const;
3939
40 virtual void UpdateTexture();40 virtual void SetScale(double);
41 virtual void UpdateTexture(nux::CairoGraphics&, double width, double height);
4142
42private:43private:
43 nux::Color _color;44 nux::Color _color;
4445
=== modified file 'launcher/QuicklistView.cpp'
--- launcher/QuicklistView.cpp 2014-02-19 14:01:02 +0000
+++ launcher/QuicklistView.cpp 2014-03-03 11:01:22 +0000
@@ -40,6 +40,7 @@
4040
41#include "unity-shared/Introspectable.h"41#include "unity-shared/Introspectable.h"
42#include "unity-shared/PanelStyle.h"42#include "unity-shared/PanelStyle.h"
43#include "unity-shared/DecorationStyle.h"
43#include "unity-shared/UnitySettings.h"44#include "unity-shared/UnitySettings.h"
4445
45#include "unity-shared/UBusWrapper.h"46#include "unity-shared/UBusWrapper.h"
@@ -320,18 +321,6 @@
320 }321 }
321}322}
322323
323QuicklistView::~QuicklistView()
324{
325 for (auto item : _item_list)
326 {
327 // Remove from introspection
328 RemoveChild(item);
329 item->UnReference();
330 }
331
332 _item_list.clear();
333}
334
335void324void
336QuicklistView::EnableQuicklistForTesting(bool enable_testing)325QuicklistView::EnableQuicklistForTesting(bool enable_testing)
337{326{
@@ -423,7 +412,7 @@
423412
424 gfxContext.PushClippingRectangle(base);413 gfxContext.PushClippingRectangle(base);
425414
426 for (auto item : _item_list)415 for (auto const& item : _item_list)
427 {416 {
428 if (item->GetVisible())417 if (item->GetVisible())
429 item->ProcessDraw(gfxContext, forceDraw);418 item->ProcessDraw(gfxContext, forceDraw);
@@ -440,17 +429,17 @@
440 int MaxItemWidth = 0;429 int MaxItemWidth = 0;
441 int TotalItemHeight = 0;430 int TotalItemHeight = 0;
442431
443 for (auto item : _item_list)432 for (auto const& item : _item_list)
444 {433 {
445 // Make sure item is in layout if it should be434 // Make sure item is in layout if it should be
446 if (!item->GetVisible())435 if (!item->GetVisible())
447 {436 {
448 _item_layout->RemoveChildObject(item);437 _item_layout->RemoveChildObject(item.GetPointer());
449 continue;438 continue;
450 }439 }
451 else if (!item->GetParentObject())440 else if (!item->GetParentObject())
452 {441 {
453 _item_layout->AddView(item, 1, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);442 _item_layout->AddView(item.GetPointer(), 1, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
454 }443 }
455444
456 nux::Size const& text_extents = item->GetTextExtents();445 nux::Size const& text_extents = item->GetTextExtents();
@@ -495,7 +484,7 @@
495 int x = RawPixel(_padding + _anchor_width + _corner_radius + _offset_correction).CP(cv_);484 int x = RawPixel(_padding + _anchor_width + _corner_radius + _offset_correction).CP(cv_);
496 int y = _top_space->GetMinimumHeight();485 int y = _top_space->GetMinimumHeight();
497486
498 for (auto item : _item_list)487 for (auto const& item : _item_list)
499 {488 {
500 if (!item->GetVisible())489 if (!item->GetVisible())
501 continue;490 continue;
@@ -513,7 +502,7 @@
513 // has bee set correctly during the layout cycle, but the cairo rendering still need to be adjusted.502 // has bee set correctly during the layout cycle, but the cairo rendering still need to be adjusted.
514 unsigned separator_width = _item_layout->GetBaseWidth();503 unsigned separator_width = _item_layout->GetBaseWidth();
515504
516 for (auto item : _item_list)505 for (auto const& item : _item_list)
517 {506 {
518 if (item->GetVisible() && item->GetCairoSurfaceWidth() != separator_width)507 if (item->GetVisible() && item->GetCairoSurfaceWidth() != separator_width)
519 {508 {
@@ -550,7 +539,7 @@
550void QuicklistView::CheckAndEmitItemSignal(int x, int y)539void QuicklistView::CheckAndEmitItemSignal(int x, int y)
551{540{
552 nux::Geometry geo;541 nux::Geometry geo;
553 for (auto item : _item_list)542 for (auto const& item : _item_list)
554 {543 {
555 if (!item->GetVisible())544 if (!item->GetVisible())
556 continue;545 continue;
@@ -561,7 +550,7 @@
561 if (geo.IsPointInside(x, y))550 if (geo.IsPointInside(x, y))
562 {551 {
563 // An action is performed: send the signal back to the application552 // An action is performed: send the signal back to the application
564 ActivateItem(item);553 ActivateItem(item.GetPointer());
565 }554 }
566 }555 }
567}556}
@@ -590,18 +579,16 @@
590579
591void QuicklistView::CancelItemsPrelightStatus()580void QuicklistView::CancelItemsPrelightStatus()
592{581{
593 for (auto item : _item_list)582 for (auto const& item : _item_list)
594 {
595 item->Select(false);583 item->Select(false);
596 }
597}584}
598585
599void QuicklistView::RecvItemMouseDrag(QuicklistMenuItem* item, int x, int y)586void QuicklistView::RecvItemMouseDrag(QuicklistMenuItem* item, int x, int y)
600{587{
601 nux::Geometry geo;588 nux::Geometry geo;
602 for (auto it : _item_list)589 for (auto const& it : _item_list)
603 {590 {
604 int item_index = GetItemIndex(it);591 int item_index = GetItemIndex(it.GetPointer());
605592
606 if (!IsMenuItemSelectable(item_index))593 if (!IsMenuItemSelectable(item_index))
607 continue;594 continue;
@@ -673,24 +660,15 @@
673660
674void QuicklistView::RemoveAllMenuItem()661void QuicklistView::RemoveAllMenuItem()
675{662{
676 for (auto item : _item_list)
677 {
678 // Remove from introspection
679 RemoveChild(item);
680 item->UnReference();
681 }
682
683
684 _item_list.clear();
685
686 _item_layout->Clear();663 _item_layout->Clear();
664 _item_list.clear();
687 _cairo_text_has_changed = true;665 _cairo_text_has_changed = true;
688 nux::GetWindowThread()->QueueObjectLayout(this);666 QueueRelayout();
689}667}
690668
691void QuicklistView::AddMenuItem(QuicklistMenuItem* item)669void QuicklistView::AddMenuItem(QuicklistMenuItem* item)
692{670{
693 if (item == 0)671 if (!item)
694 return;672 return;
695673
696 item->sigTextChanged.connect(sigc::mem_fun(this, &QuicklistView::RecvCairoTextChanged));674 item->sigTextChanged.connect(sigc::mem_fun(this, &QuicklistView::RecvCairoTextChanged));
@@ -700,15 +678,12 @@
700 item->sigMouseEnter.connect(sigc::mem_fun(this, &QuicklistView::RecvItemMouseEnter));678 item->sigMouseEnter.connect(sigc::mem_fun(this, &QuicklistView::RecvItemMouseEnter));
701 item->sigMouseLeave.connect(sigc::mem_fun(this, &QuicklistView::RecvItemMouseLeave));679 item->sigMouseLeave.connect(sigc::mem_fun(this, &QuicklistView::RecvItemMouseLeave));
702 item->sigMouseDrag.connect(sigc::mem_fun(this, &QuicklistView::RecvItemMouseDrag));680 item->sigMouseDrag.connect(sigc::mem_fun(this, &QuicklistView::RecvItemMouseDrag));
681 item->SetScale(cv_->DPIScale());
703682
704 _item_list.push_back(item);683 _item_list.push_back(QuicklistMenuItem::Ptr(item));
705 item->Reference();
706 // Add to introspection
707 AddChild(item);
708684
709 _cairo_text_has_changed = true;685 _cairo_text_has_changed = true;
710 nux::GetWindowThread()->QueueObjectLayout(this);686 QueueRelayout();
711 NeedRedraw();
712}687}
713688
714void QuicklistView::RenderQuicklistView()689void QuicklistView::RenderQuicklistView()
@@ -726,10 +701,10 @@
726 if (index < (int)_item_list.size())701 if (index < (int)_item_list.size())
727 {702 {
728 int i = 0;703 int i = 0;
729 for (auto item : _item_list)704 for (auto const& item : _item_list)
730 {705 {
731 if (i++ == index)706 if (i++ == index)
732 return item;707 return item.GetPointer();
733 }708 }
734 }709 }
735710
@@ -740,7 +715,7 @@
740{715{
741 int index = -1;716 int index = -1;
742717
743 for (auto it : _item_list)718 for (auto const& it : _item_list)
744 {719 {
745 ++index;720 ++index;
746721
@@ -760,7 +735,7 @@
760 return QuicklistMenuItemType::UNKNOWN;735 return QuicklistMenuItemType::UNKNOWN;
761}736}
762737
763std::list<QuicklistMenuItem*> QuicklistView::GetChildren()738std::list<QuicklistMenuItem::Ptr> QuicklistView::GetChildren()
764{739{
765 return _item_list;740 return _item_list;
766}741}
@@ -771,23 +746,23 @@
771}746}
772747
773void ql_tint_dot_hl(cairo_t* cr,748void ql_tint_dot_hl(cairo_t* cr,
749 gfloat scale,
774 gint width,750 gint width,
775 gint height,751 gint height,
776 gfloat hl_x,752 gfloat hl_x,
777 gfloat hl_y,753 gfloat hl_y,
778 gfloat hl_size,754 gfloat hl_size,
779 gfloat* rgba_tint,755 nux::Color const& tint_color,
780 gfloat* rgba_hl,756 nux::Color const& hl_color,
781 gfloat* rgba_dot)757 nux::Color const& dot_color)
782{758{
783 cairo_surface_t* dots_surf = NULL;
784 cairo_t* dots_cr = NULL;
785 cairo_pattern_t* dots_pattern = NULL;759 cairo_pattern_t* dots_pattern = NULL;
786 cairo_pattern_t* hl_pattern = NULL;760 cairo_pattern_t* hl_pattern = NULL;
787761
788 // create context for dot-pattern762 // create context for dot-pattern
789 dots_surf = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 4, 4);763 nux::CairoGraphics dots_surf(CAIRO_FORMAT_ARGB32, 4 * scale, 4 * scale);
790 dots_cr = cairo_create(dots_surf);764 cairo_surface_set_device_scale(dots_surf.GetSurface(), scale, scale);
765 cairo_t* dots_cr = dots_surf.GetInternalContext();
791766
792 // clear normal context767 // clear normal context
793 cairo_scale(cr, 1.0f, 1.0f);768 cairo_scale(cr, 1.0f, 1.0f);
@@ -803,10 +778,10 @@
803778
804 // fill path of normal context with tint779 // fill path of normal context with tint
805 cairo_set_source_rgba(cr,780 cairo_set_source_rgba(cr,
806 rgba_tint[0],781 tint_color.red,
807 rgba_tint[1],782 tint_color.green,
808 rgba_tint[2],783 tint_color.blue,
809 rgba_tint[3]);784 tint_color.alpha);
810 cairo_fill_preserve(cr);785 cairo_fill_preserve(cr);
811786
812 // create pattern in dot-context787 // create pattern in dot-context
@@ -815,15 +790,15 @@
815 cairo_scale(dots_cr, 1.0f, 1.0f);790 cairo_scale(dots_cr, 1.0f, 1.0f);
816 cairo_set_operator(dots_cr, CAIRO_OPERATOR_OVER);791 cairo_set_operator(dots_cr, CAIRO_OPERATOR_OVER);
817 cairo_set_source_rgba(dots_cr,792 cairo_set_source_rgba(dots_cr,
818 rgba_dot[0],793 dot_color.red,
819 rgba_dot[1],794 dot_color.green,
820 rgba_dot[2],795 dot_color.blue,
821 rgba_dot[3]);796 dot_color.alpha);
822 cairo_rectangle(dots_cr, 0.0f, 0.0f, 1.0f, 1.0f);797 cairo_rectangle(dots_cr, 0.0f, 0.0f, 1.0f, 1.0f);
823 cairo_fill(dots_cr);798 cairo_fill(dots_cr);
824 cairo_rectangle(dots_cr, 2.0f, 2.0f, 1.0f, 1.0f);799 cairo_rectangle(dots_cr, 2.0f, 2.0f, 1.0f, 1.0f);
825 cairo_fill(dots_cr);800 cairo_fill(dots_cr);
826 dots_pattern = cairo_pattern_create_for_surface(dots_surf);801 dots_pattern = cairo_pattern_create_for_surface(dots_surf.GetSurface());
827802
828 // fill path of normal context with dot-pattern803 // fill path of normal context with dot-pattern
829 cairo_set_operator(cr, CAIRO_OPERATOR_OVER);804 cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
@@ -831,8 +806,6 @@
831 cairo_pattern_set_extend(dots_pattern, CAIRO_EXTEND_REPEAT);806 cairo_pattern_set_extend(dots_pattern, CAIRO_EXTEND_REPEAT);
832 cairo_fill_preserve(cr);807 cairo_fill_preserve(cr);
833 cairo_pattern_destroy(dots_pattern);808 cairo_pattern_destroy(dots_pattern);
834 cairo_surface_destroy(dots_surf);
835 cairo_destroy(dots_cr);
836809
837 // draw highlight810 // draw highlight
838 cairo_set_operator(cr, CAIRO_OPERATOR_OVER);811 cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
@@ -844,10 +817,10 @@
844 hl_size);817 hl_size);
845 cairo_pattern_add_color_stop_rgba(hl_pattern,818 cairo_pattern_add_color_stop_rgba(hl_pattern,
846 0.0f,819 0.0f,
847 rgba_hl[0],820 hl_color.red,
848 rgba_hl[1],821 hl_color.green,
849 rgba_hl[2],822 hl_color.blue,
850 rgba_hl[3]);823 hl_color.alpha);
851 cairo_pattern_add_color_stop_rgba(hl_pattern, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f);824 cairo_pattern_add_color_stop_rgba(hl_pattern, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f);
852 cairo_set_source(cr, hl_pattern);825 cairo_set_source(cr, hl_pattern);
853 cairo_fill(cr);826 cairo_fill(cr);
@@ -857,17 +830,8 @@
857void ql_setup(cairo_surface_t** surf,830void ql_setup(cairo_surface_t** surf,
858 cairo_t** cr,831 cairo_t** cr,
859 gboolean outline,832 gboolean outline,
860 gint width,
861 gint height,
862 gboolean negative)833 gboolean negative)
863{834{
864// // create context
865// if (outline)
866// *surf = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
867// else
868// *surf = cairo_image_surface_create (CAIRO_FORMAT_A8, width, height);
869// *cr = cairo_create (*surf);
870
871 // clear context835 // clear context
872 cairo_scale(*cr, 1.0f, 1.0f);836 cairo_scale(*cr, 1.0f, 1.0f);
873 if (outline)837 if (outline)
@@ -889,8 +853,8 @@
889void ql_compute_full_mask_path(cairo_t* cr,853void ql_compute_full_mask_path(cairo_t* cr,
890 gfloat anchor_width,854 gfloat anchor_width,
891 gfloat anchor_height,855 gfloat anchor_height,
892 gint width,856 gfloat width,
893 gint height,857 gfloat height,
894 gint upper_size,858 gint upper_size,
895 gfloat radius,859 gfloat radius,
896 guint pad)860 guint pad)
@@ -1009,7 +973,7 @@
1009973
1010void ql_compute_outline(cairo_t* cr,974void ql_compute_outline(cairo_t* cr,
1011 gfloat line_width,975 gfloat line_width,
1012 gfloat* rgba_line,976 nux::Color const& line_color,
1013 gfloat size)977 gfloat size)
1014{978{
1015 cairo_pattern_t* pattern = NULL;979 cairo_pattern_t* pattern = NULL;
@@ -1021,25 +985,25 @@
1021985
1022 pattern = cairo_pattern_create_linear(x, y, size, y);986 pattern = cairo_pattern_create_linear(x, y, size, y);
1023 cairo_pattern_add_color_stop_rgba(pattern, 0.0f,987 cairo_pattern_add_color_stop_rgba(pattern, 0.0f,
1024 rgba_line[0],988 line_color.red,
1025 rgba_line[1],989 line_color.green,
1026 rgba_line[2],990 line_color.blue,
1027 rgba_line[3]);991 line_color.alpha);
1028 cairo_pattern_add_color_stop_rgba(pattern, offset,992 cairo_pattern_add_color_stop_rgba(pattern, offset,
1029 rgba_line[0],993 line_color.red,
1030 rgba_line[1],994 line_color.green,
1031 rgba_line[2],995 line_color.blue,
1032 rgba_line[3]);996 line_color.alpha);
1033 cairo_pattern_add_color_stop_rgba(pattern, 1.1f * offset,997 cairo_pattern_add_color_stop_rgba(pattern, 1.1f * offset,
1034 rgba_line[0] * 0.65f,998 line_color.red * 0.65f,
1035 rgba_line[1] * 0.65f,999 line_color.green * 0.65f,
1036 rgba_line[2] * 0.65f,1000 line_color.blue * 0.65f,
1037 rgba_line[3]);1001 line_color.alpha);
1038 cairo_pattern_add_color_stop_rgba(pattern, 1.0f,1002 cairo_pattern_add_color_stop_rgba(pattern, 1.0f,
1039 rgba_line[0] * 0.65f,1003 line_color.red * 0.65f,
1040 rgba_line[1] * 0.65f,1004 line_color.green * 0.65f,
1041 rgba_line[2] * 0.65f,1005 line_color.blue * 0.65f,
1042 rgba_line[3]);1006 line_color.alpha);
1043 cairo_set_source(cr, pattern);1007 cairo_set_source(cr, pattern);
1044 cairo_set_line_width(cr, line_width);1008 cairo_set_line_width(cr, line_width);
1045 cairo_stroke(cr);1009 cairo_stroke(cr);
@@ -1049,7 +1013,7 @@
1049void ql_draw(cairo_t* cr,1013void ql_draw(cairo_t* cr,
1050 gboolean outline,1014 gboolean outline,
1051 gfloat line_width,1015 gfloat line_width,
1052 gfloat* rgba,1016 nux::Color const& color,
1053 gboolean negative,1017 gboolean negative,
1054 gboolean stroke)1018 gboolean stroke)
1055{1019{
@@ -1060,7 +1024,7 @@
1060 if (outline)1024 if (outline)
1061 {1025 {
1062 cairo_set_line_width(cr, line_width);1026 cairo_set_line_width(cr, line_width);
1063 cairo_set_source_rgba(cr, rgba[0], rgba[1], rgba[2], rgba[3]);1027 cairo_set_source_rgba(cr, color.red, color.green, color.blue, color.alpha);
1064 }1028 }
1065 else1029 else
1066 {1030 {
@@ -1080,7 +1044,7 @@
1080void ql_finalize(cairo_t** cr,1044void ql_finalize(cairo_t** cr,
1081 gboolean outline,1045 gboolean outline,
1082 gfloat line_width,1046 gfloat line_width,
1083 gfloat* rgba,1047 nux::Color const& color,
1084 gboolean negative,1048 gboolean negative,
1085 gboolean stroke)1049 gboolean stroke)
1086{1050{
@@ -1091,7 +1055,7 @@
1091 if (outline)1055 if (outline)
1092 {1056 {
1093 cairo_set_line_width(*cr, line_width);1057 cairo_set_line_width(*cr, line_width);
1094 cairo_set_source_rgba(*cr, rgba[0], rgba[1], rgba[2], rgba[3]);1058 cairo_set_source_rgba(*cr, color.red, color.green, color.blue, color.alpha);
1095 }1059 }
1096 else1060 else
1097 {1061 {
@@ -1112,19 +1076,19 @@
1112ql_compute_full_outline_shadow(1076ql_compute_full_outline_shadow(
1113 cairo_t* cr,1077 cairo_t* cr,
1114 cairo_surface_t* surf,1078 cairo_surface_t* surf,
1115 gint width,1079 gfloat width,
1116 gint height,1080 gfloat height,
1117 gfloat anchor_width,1081 gfloat anchor_width,
1118 gfloat anchor_height,1082 gfloat anchor_height,
1119 gint upper_size,1083 gint upper_size,
1120 gfloat corner_radius,1084 gfloat corner_radius,
1121 guint blur_coeff,1085 guint blur_coeff,
1122 gfloat* rgba_shadow,1086 nux::Color const& rgba_shadow,
1123 gfloat line_width,1087 gfloat line_width,
1124 gint padding_size,1088 gint padding_size,
1125 gfloat* rgba_line)1089 nux::Color const& rgba_line)
1126{1090{
1127 ql_setup(&surf, &cr, TRUE, width, height, FALSE);1091 ql_setup(&surf, &cr, TRUE, FALSE);
1128 ql_compute_full_mask_path(cr,1092 ql_compute_full_mask_path(cr,
1129 anchor_width,1093 anchor_width,
1130 anchor_height,1094 anchor_height,
@@ -1144,10 +1108,9 @@
1144void ql_compute_full_mask(1108void ql_compute_full_mask(
1145 cairo_t* cr,1109 cairo_t* cr,
1146 cairo_surface_t* surf,1110 cairo_surface_t* surf,
1147 gint width,1111 gfloat width,
1148 gint height,1112 gfloat height,
1149 gfloat radius,1113 gfloat radius,
1150 guint shadow_radius,
1151 gfloat anchor_width,1114 gfloat anchor_width,
1152 gfloat anchor_height,1115 gfloat anchor_height,
1153 gint upper_size,1116 gint upper_size,
@@ -1155,9 +1118,9 @@
1155 gboolean outline,1118 gboolean outline,
1156 gfloat line_width,1119 gfloat line_width,
1157 gint padding_size,1120 gint padding_size,
1158 gfloat* rgba)1121 nux::Color const& rgba)
1159{1122{
1160 ql_setup(&surf, &cr, outline, width, height, negative);1123 ql_setup(&surf, &cr, outline, negative);
1161 ql_compute_full_mask_path(cr,1124 ql_compute_full_mask_path(cr,
1162 anchor_width,1125 anchor_width,
1163 anchor_height,1126 anchor_height,
@@ -1210,26 +1173,33 @@
1210 }1173 }
1211 }1174 }
12121175
1213 float blur_coef = 6.0f;1176 auto const& deco_style = decoration::Style::Get();
1177 float dpi_scale = cv_->DPIScale();
1178 float blur_coef = std::round(deco_style->ActiveShadowRadius() * dpi_scale / 2.0f);
12141179
1215 nux::CairoGraphics cairo_bg(CAIRO_FORMAT_ARGB32, width, height);1180 nux::CairoGraphics cairo_bg(CAIRO_FORMAT_ARGB32, width, height);
1216 nux::CairoGraphics cairo_mask(CAIRO_FORMAT_ARGB32, width, height);1181 nux::CairoGraphics cairo_mask(CAIRO_FORMAT_ARGB32, width, height);
1217 nux::CairoGraphics cairo_outline(CAIRO_FORMAT_ARGB32, width, height);1182 nux::CairoGraphics cairo_outline(CAIRO_FORMAT_ARGB32, width, height);
12181183
1219 cairo_t* cr_bg = cairo_bg.GetContext();1184 cairo_surface_set_device_scale(cairo_bg.GetSurface(), dpi_scale, dpi_scale);
1220 cairo_t* cr_mask = cairo_mask.GetContext();1185 cairo_surface_set_device_scale(cairo_mask.GetSurface(), dpi_scale, dpi_scale);
1221 cairo_t* cr_outline = cairo_outline.GetContext();1186 cairo_surface_set_device_scale(cairo_outline.GetSurface(), dpi_scale, dpi_scale);
12221187
1223 float tint_color[4] = {0.0f, 0.0f, 0.0f, HasBlurredBackground() ? 0.60f : 1.0f};1188 cairo_t* cr_bg = cairo_bg.GetInternalContext();
1224 float hl_color[4] = {1.0f, 1.0f, 1.0f, 0.35f};1189 cairo_t* cr_mask = cairo_mask.GetInternalContext();
1225 float dot_color[4] = {1.0f, 1.0f, 1.0f, 0.03f};1190 cairo_t* cr_outline = cairo_outline.GetInternalContext();
1226 float shadow_color[4] = {0.0f, 0.0f, 0.0f, 1.00f};1191
1227 float outline_color[4] = {1.0f, 1.0f, 1.0f, 0.40f};1192 nux::Color tint_color(0.0f, 0.0f, 0.0f, HasBlurredBackground() ? 0.60f : 1.0f);
1228 float mask_color[4] = {1.0f, 1.0f, 1.0f, 1.00f};1193 nux::Color hl_color(1.0f, 1.0f, 1.0f, 0.35f);
1194 nux::Color dot_color(1.0f, 1.0f, 1.0f, 0.03f);
1195 nux::Color shadow_color(deco_style->ActiveShadowColor());
1196 nux::Color outline_color(1.0f, 1.0f, 1.0f, 0.40f);
1197 nux::Color mask_color(1.0f, 1.0f, 1.0f, 1.00f);
12291198
1230 ql_tint_dot_hl(cr_bg,1199 ql_tint_dot_hl(cr_bg,
1231 width,1200 dpi_scale,
1232 height,1201 width / dpi_scale,
1202 height / dpi_scale,
1233 width / 2.0f,1203 width / 2.0f,
1234 0,1204 0,
1235 nux::Max<float>(width / 1.6f, height / 1.6f),1205 nux::Max<float>(width / 1.6f, height / 1.6f),
@@ -1241,38 +1211,33 @@
1241 (1211 (
1242 cr_outline,1212 cr_outline,
1243 cairo_outline.GetSurface(),1213 cairo_outline.GetSurface(),
1244 width,1214 width / dpi_scale,
1245 height,1215 height / dpi_scale,
1246 _anchor_width.CP(cv_),1216 _anchor_width,
1247 _anchor_height.CP(cv_),1217 _anchor_height,
1248 size_above_anchor.CP(cv_),1218 size_above_anchor,
1249 _corner_radius.CP(cv_),1219 _corner_radius,
1250 blur_coef,1220 blur_coef,
1251 shadow_color,1221 shadow_color,
1252 1.0f,1222 1.0f * dpi_scale,
1253 _padding.CP(cv_),1223 _padding,
1254 outline_color);1224 outline_color);
12551225
1256 ql_compute_full_mask(1226 ql_compute_full_mask(
1257 cr_mask,1227 cr_mask,
1258 cairo_mask.GetSurface(),1228 cairo_mask.GetSurface(),
1259 width,1229 width / dpi_scale,
1260 height,1230 height / dpi_scale,
1261 _corner_radius.CP(cv_), // radius,1231 _corner_radius, // radius,
1262 RawPixel(16).CP(cv_), // shadow_radius,1232 _anchor_width, // anchor_width,
1263 _anchor_width.CP(cv_), // anchor_width,1233 _anchor_height, // anchor_height,
1264 _anchor_height.CP(cv_), // anchor_height,1234 size_above_anchor, // upper_size,
1265 size_above_anchor.CP(cv_), // upper_size,
1266 true, // negative,1235 true, // negative,
1267 false, // outline,1236 false, // outline,
1268 1.0, // line_width,1237 1.0, // line_width,
1269 _padding.CP(cv_), // padding_size,1238 _padding, // padding_size,
1270 mask_color);1239 mask_color);
12711240
1272 cairo_destroy(cr_bg);
1273 cairo_destroy(cr_outline);
1274 cairo_destroy(cr_mask);
1275
1276 texture_bg_ = texture_ptr_from_cairo_graphics(cairo_bg);1241 texture_bg_ = texture_ptr_from_cairo_graphics(cairo_bg);
1277 texture_mask_ = texture_ptr_from_cairo_graphics(cairo_mask);1242 texture_mask_ = texture_ptr_from_cairo_graphics(cairo_mask);
1278 texture_outline_ = texture_ptr_from_cairo_graphics(cairo_outline);1243 texture_outline_ = texture_ptr_from_cairo_graphics(cairo_outline);
@@ -1341,12 +1306,12 @@
13411306
1342debug::Introspectable::IntrospectableList QuicklistView::GetIntrospectableChildren()1307debug::Introspectable::IntrospectableList QuicklistView::GetIntrospectableChildren()
1343{1308{
1344 _introspectable_children.clear();1309 debug::Introspectable::IntrospectableList list(_item_list.size());
1345 for (auto item: _item_list)1310
1346 {1311 for (auto const& item: _item_list)
1347 _introspectable_children.push_back(item);1312 list.push_back(item.GetPointer());
1348 }1313
1349 return _introspectable_children;1314 return list;
1350}1315}
13511316
1352} // NAMESPACE1317} // NAMESPACE
13531318
=== modified file 'launcher/QuicklistView.h'
--- launcher/QuicklistView.h 2014-02-19 14:01:02 +0000
+++ launcher/QuicklistView.h 2014-03-03 11:01:22 +0000
@@ -46,7 +46,6 @@
46 NUX_DECLARE_OBJECT_TYPE(QuicklistView, unity::CairoBaseWindow);46 NUX_DECLARE_OBJECT_TYPE(QuicklistView, unity::CairoBaseWindow);
47public:47public:
48 QuicklistView(int monitor = 0);48 QuicklistView(int monitor = 0);
49 ~QuicklistView();
5049
51 void SetText(std::string const& text);50 void SetText(std::string const& text);
5251
@@ -67,7 +66,7 @@
67 QuicklistMenuItem* GetNthItems(int index);66 QuicklistMenuItem* GetNthItems(int index);
68 QuicklistMenuItemType GetNthType(int index);67 QuicklistMenuItemType GetNthType(int index);
69 int GetItemIndex(QuicklistMenuItem* item);68 int GetItemIndex(QuicklistMenuItem* item);
70 std::list<QuicklistMenuItem*> GetChildren();69 std::list<QuicklistMenuItem::Ptr> GetChildren();
71 void SelectFirstItem();70 void SelectFirstItem();
7271
73 void TestMenuItems(DbusmenuMenuitem* root);72 void TestMenuItems(DbusmenuMenuitem* root);
@@ -171,13 +170,10 @@
171170
172 bool _cairo_text_has_changed;171 bool _cairo_text_has_changed;
173 void UpdateTexture();172 void UpdateTexture();
174 std::list<QuicklistMenuItem*> _item_list;173 std::list<QuicklistMenuItem::Ptr> _item_list;
175174
176 // used by keyboard/a11y-navigation175 // used by keyboard/a11y-navigation
177 int _current_item_index;176 int _current_item_index;
178
179 // list of introspectable children, used to return children in the correct order:
180 IntrospectableList _introspectable_children;
181};177};
182178
183} // NAMESPACE179} // NAMESPACE
184180
=== modified file 'launcher/Tooltip.cpp'
--- launcher/Tooltip.cpp 2014-02-19 14:01:02 +0000
+++ launcher/Tooltip.cpp 2014-03-03 11:01:22 +0000
@@ -25,6 +25,7 @@
25#include <unity-shared/CairoTexture.h>25#include <unity-shared/CairoTexture.h>
26#include <unity-shared/RawPixel.h>26#include <unity-shared/RawPixel.h>
27#include <unity-shared/UnitySettings.h>27#include <unity-shared/UnitySettings.h>
28#include "unity-shared/DecorationStyle.h"
2829
29#include "Tooltip.h"30#include "Tooltip.h"
3031
@@ -59,6 +60,7 @@
59 _vlayout->AddLayout(_top_space, 0);60 _vlayout->AddLayout(_top_space, 0);
6061
61 _tooltip_text = new StaticCairoText(TEXT(""), NUX_TRACKER_LOCATION);62 _tooltip_text = new StaticCairoText(TEXT(""), NUX_TRACKER_LOCATION);
63 _tooltip_text->SetScale(cv_->DPIScale());
62 _tooltip_text->SetTextAlignment(StaticCairoText::AlignState::NUX_ALIGN_CENTRE);64 _tooltip_text->SetTextAlignment(StaticCairoText::AlignState::NUX_ALIGN_CENTRE);
63 _tooltip_text->SetTextVerticalAlignment(StaticCairoText::AlignState::NUX_ALIGN_CENTRE);65 _tooltip_text->SetTextVerticalAlignment(StaticCairoText::AlignState::NUX_ALIGN_CENTRE);
64 _tooltip_text->SetMinimumWidth(MINIMUM_TEXT_WIDTH.CP(cv_));66 _tooltip_text->SetMinimumWidth(MINIMUM_TEXT_WIDTH.CP(cv_));
@@ -169,14 +171,14 @@
169/////////////////////////////////////////////////////////////////////////////////////////////////171/////////////////////////////////////////////////////////////////////////////////////////////////
170172
171void tint_dot_hl(cairo_t* cr,173void tint_dot_hl(cairo_t* cr,
172 gint width,174 gfloat width,
173 gint height,175 gfloat height,
174 gfloat hl_x,176 gfloat hl_x,
175 gfloat hl_y,177 gfloat hl_y,
176 gfloat hl_size,178 gfloat hl_size,
177 gfloat* rgba_tint,179 nux::Color const& tint_color,
178 gfloat* rgba_hl,180 nux::Color const& hl_color,
179 gfloat* rgba_dot)181 nux::Color const& dot_color)
180{182{
181 cairo_pattern_t* hl_pattern = NULL;183 cairo_pattern_t* hl_pattern = NULL;
182184
@@ -190,14 +192,14 @@
190 cairo_set_operator(cr, CAIRO_OPERATOR_OVER);192 cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
191193
192 // create path in normal context194 // create path in normal context
193 cairo_rectangle(cr, 0.0f, 0.0f, (gdouble) width, (gdouble) height);195 cairo_rectangle(cr, 0.0f, 0.0f, width, height);
194196
195 // fill path of normal context with tint197 // fill path of normal context with tint
196 cairo_set_source_rgba(cr,198 cairo_set_source_rgba(cr,
197 rgba_tint[0],199 tint_color.red,
198 rgba_tint[1],200 tint_color.green,
199 rgba_tint[2],201 tint_color.blue,
200 rgba_tint[3]);202 tint_color.alpha);
201 cairo_fill_preserve(cr);203 cairo_fill_preserve(cr);
202204
203 // draw glow205 // draw glow
@@ -209,10 +211,10 @@
209 hl_size);211 hl_size);
210 cairo_pattern_add_color_stop_rgba(hl_pattern,212 cairo_pattern_add_color_stop_rgba(hl_pattern,
211 0.0f,213 0.0f,
212 rgba_hl[0],214 hl_color.red,
213 rgba_hl[1],215 hl_color.green,
214 rgba_hl[2],216 hl_color.blue,
215 rgba_hl[3]);217 hl_color.alpha);
216 cairo_pattern_add_color_stop_rgba(hl_pattern, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f);218 cairo_pattern_add_color_stop_rgba(hl_pattern, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f);
217 cairo_set_source(cr, hl_pattern);219 cairo_set_source(cr, hl_pattern);
218 cairo_fill(cr);220 cairo_fill(cr);
@@ -222,8 +224,6 @@
222void _setup(cairo_surface_t** surf,224void _setup(cairo_surface_t** surf,
223 cairo_t** cr,225 cairo_t** cr,
224 gboolean outline,226 gboolean outline,
225 gint width,
226 gint height,
227 gboolean negative)227 gboolean negative)
228{228{
229 // clear context229 // clear context
@@ -247,8 +247,8 @@
247void _compute_full_mask_path(cairo_t* cr,247void _compute_full_mask_path(cairo_t* cr,
248 gfloat anchor_width,248 gfloat anchor_width,
249 gfloat anchor_height,249 gfloat anchor_height,
250 gint width,250 gfloat width,
251 gint height,251 gfloat height,
252 gint upper_size,252 gint upper_size,
253 gfloat radius,253 gfloat radius,
254 guint pad)254 guint pad)
@@ -305,14 +305,14 @@
305305
306void compute_outline(cairo_t* cr,306void compute_outline(cairo_t* cr,
307 gfloat line_width,307 gfloat line_width,
308 gfloat* rgba_line)308 nux::Color const& line_color)
309{309{
310 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);310 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
311 cairo_set_source_rgba(cr,311 cairo_set_source_rgba(cr,
312 rgba_line[0],312 line_color.red,
313 rgba_line[1],313 line_color.green,
314 rgba_line[2],314 line_color.blue,
315 rgba_line[3]);315 line_color.alpha);
316 cairo_set_line_width(cr, line_width);316 cairo_set_line_width(cr, line_width);
317 cairo_stroke(cr);317 cairo_stroke(cr);
318}318}
@@ -320,7 +320,7 @@
320void _draw(cairo_t* cr,320void _draw(cairo_t* cr,
321 gboolean outline,321 gboolean outline,
322 gfloat line_width,322 gfloat line_width,
323 gfloat* rgba,323 nux::Color const& color,
324 gboolean negative,324 gboolean negative,
325 gboolean stroke)325 gboolean stroke)
326{326{
@@ -331,7 +331,7 @@
331 if (outline)331 if (outline)
332 {332 {
333 cairo_set_line_width(cr, line_width);333 cairo_set_line_width(cr, line_width);
334 cairo_set_source_rgba(cr, rgba[0], rgba[1], rgba[2], rgba[3]);334 cairo_set_source_rgba(cr, color.red, color.green, color.blue, color.alpha);
335 }335 }
336 else336 else
337 {337 {
@@ -351,7 +351,7 @@
351void _finalize(cairo_t** cr,351void _finalize(cairo_t** cr,
352 gboolean outline,352 gboolean outline,
353 gfloat line_width,353 gfloat line_width,
354 gfloat* rgba,354 nux::Color const& color,
355 gboolean negative,355 gboolean negative,
356 gboolean stroke)356 gboolean stroke)
357{357{
@@ -362,7 +362,7 @@
362 if (outline)362 if (outline)
363 {363 {
364 cairo_set_line_width(*cr, line_width);364 cairo_set_line_width(*cr, line_width);
365 cairo_set_source_rgba(*cr, rgba[0], rgba[1], rgba[2], rgba[3]);365 cairo_set_source_rgba(*cr, color.red, color.green, color.blue, color.alpha);
366 }366 }
367 else367 else
368 {368 {
@@ -383,19 +383,19 @@
383compute_full_outline_shadow(383compute_full_outline_shadow(
384 cairo_t* cr,384 cairo_t* cr,
385 cairo_surface_t* surf,385 cairo_surface_t* surf,
386 gint width,386 gfloat width,
387 gint height,387 gfloat height,
388 gfloat anchor_width,388 gfloat anchor_width,
389 gfloat anchor_height,389 gfloat anchor_height,
390 gint upper_size,390 gint upper_size,
391 gfloat corner_radius,391 gfloat corner_radius,
392 guint blur_coeff,392 guint blur_coeff,
393 gfloat* rgba_shadow,393 nux::Color const& shadow_color,
394 gfloat line_width,394 gfloat line_width,
395 gint padding_size,395 gint padding_size,
396 gfloat* rgba_line)396 nux::Color const& line_color)
397{397{
398 _setup(&surf, &cr, TRUE, width, height, FALSE);398 _setup(&surf, &cr, TRUE, FALSE);
399 _compute_full_mask_path(cr,399 _compute_full_mask_path(cr,
400 anchor_width,400 anchor_width,
401 anchor_height,401 anchor_height,
@@ -405,20 +405,19 @@
405 corner_radius,405 corner_radius,
406 padding_size);406 padding_size);
407407
408 _draw(cr, TRUE, line_width, rgba_shadow, FALSE, FALSE);408 _draw(cr, TRUE, line_width, shadow_color, FALSE, FALSE);
409 nux::CairoGraphics dummy(CAIRO_FORMAT_A1, 1, 1);409 nux::CairoGraphics dummy(CAIRO_FORMAT_A1, 1, 1);
410 dummy.BlurSurface(blur_coeff, surf);410 dummy.BlurSurface(blur_coeff, surf);
411 compute_mask(cr);411 compute_mask(cr);
412 compute_outline(cr, line_width, rgba_line);412 compute_outline(cr, line_width, line_color);
413}413}
414414
415void compute_full_mask(415void compute_full_mask(
416 cairo_t* cr,416 cairo_t* cr,
417 cairo_surface_t* surf,417 cairo_surface_t* surf,
418 gint width,418 gfloat width,
419 gint height,419 gfloat height,
420 gfloat radius,420 gfloat radius,
421 guint shadow_radius,
422 gfloat anchor_width,421 gfloat anchor_width,
423 gfloat anchor_height,422 gfloat anchor_height,
424 gint upper_size,423 gint upper_size,
@@ -426,9 +425,9 @@
426 gboolean outline,425 gboolean outline,
427 gfloat line_width,426 gfloat line_width,
428 gint padding_size,427 gint padding_size,
429 gfloat* rgba)428 nux::Color const& color)
430{429{
431 _setup(&surf, &cr, outline, width, height, negative);430 _setup(&surf, &cr, outline, negative);
432 _compute_full_mask_path(cr,431 _compute_full_mask_path(cr,
433 anchor_width,432 anchor_width,
434 anchor_height,433 anchor_height,
@@ -437,7 +436,7 @@
437 upper_size,436 upper_size,
438 radius,437 radius,
439 padding_size);438 padding_size);
440 _finalize(&cr, outline, line_width, rgba, negative, outline);439 _finalize(&cr, outline, line_width, color, negative, outline);
441}440}
442441
443void Tooltip::UpdateTexture()442void Tooltip::UpdateTexture()
@@ -451,7 +450,9 @@
451 int x = _anchorX - PADDING.CP(cv_);450 int x = _anchorX - PADDING.CP(cv_);
452 int y = _anchorY - height / 2;451 int y = _anchorY - height / 2;
453452
454 float blur_coef = 6.0f;453 auto const& deco_style = decoration::Style::Get();
454 float dpi_scale = cv_->DPIScale();
455 float blur_coef = std::round(deco_style->ActiveShadowRadius() * dpi_scale / 2.0f);
455456
456 SetBaseX(x);457 SetBaseX(x);
457 SetBaseY(y);458 SetBaseY(y);
@@ -460,30 +461,32 @@
460 nux::CairoGraphics cairo_mask(CAIRO_FORMAT_ARGB32, width, height);461 nux::CairoGraphics cairo_mask(CAIRO_FORMAT_ARGB32, width, height);
461 nux::CairoGraphics cairo_outline(CAIRO_FORMAT_ARGB32, width, height);462 nux::CairoGraphics cairo_outline(CAIRO_FORMAT_ARGB32, width, height);
462463
463 cairo_t* cr_bg = cairo_bg.GetContext();464 cairo_surface_set_device_scale(cairo_bg.GetSurface(), dpi_scale, dpi_scale);
464 cairo_t* cr_mask = cairo_mask.GetContext();465 cairo_surface_set_device_scale(cairo_mask.GetSurface(), dpi_scale, dpi_scale);
465 cairo_t* cr_outline = cairo_outline.GetContext();466 cairo_surface_set_device_scale(cairo_outline.GetSurface(), dpi_scale, dpi_scale);
466467
467 float tint_color[4] = {0.074f, 0.074f, 0.074f, 0.80f};468 cairo_t* cr_bg = cairo_bg.GetInternalContext();
468 float hl_color[4] = {1.0f, 1.0f, 1.0f, 0.8f};469 cairo_t* cr_mask = cairo_mask.GetInternalContext();
469 float dot_color[4] = {1.0f, 1.0f, 1.0f, 0.20f};470 cairo_t* cr_outline = cairo_outline.GetInternalContext();
470 float shadow_color[4] = {0.0f, 0.0f, 0.0f, 1.00f};471
471 float outline_color[4] = {1.0f, 1.0f, 1.0f, 0.15f};472 nux::Color tint_color(0.074f, 0.074f, 0.074f, 0.80f);
472 float mask_color[4] = {1.0f, 1.0f, 1.0f, 1.00f};473 nux::Color hl_color(1.0f, 1.0f, 1.0f, 0.8f);
474 nux::Color dot_color(1.0f, 1.0f, 1.0f, 0.20f);
475 nux::Color shadow_color(deco_style->ActiveShadowColor());
476 nux::Color outline_color(1.0f, 1.0f, 1.0f, 0.15f);
477 nux::Color mask_color(1.0f, 1.0f, 1.0f, 1.00f);
473478
474 if (!HasBlurredBackground())479 if (!HasBlurredBackground())
475 {480 {
476 //If low gfx is detected then disable transparency because we're not bluring using our blur anymore.481 //If low gfx is detected then disable transparency because we're not bluring using our blur anymore.
477 const float alpha_value = 1.0f;482 tint_color.alpha = 1.0f;
478483 hl_color.alpha = 1.0f;
479 tint_color[3] = alpha_value;484 dot_color.alpha = 1.0f;
480 hl_color[3] = alpha_value;
481 dot_color[3] = alpha_value;
482 }485 }
483486
484 tint_dot_hl(cr_bg,487 tint_dot_hl(cr_bg,
485 width,488 width / dpi_scale,
486 height,489 height / dpi_scale,
487 width / 2.0f,490 width / 2.0f,
488 0,491 0,
489 nux::Max<float>(width / 1.3f, height / 1.3f),492 nux::Max<float>(width / 1.3f, height / 1.3f),
@@ -495,38 +498,33 @@
495 (498 (
496 cr_outline,499 cr_outline,
497 cairo_outline.GetSurface(),500 cairo_outline.GetSurface(),
498 width,501 width / dpi_scale,
499 height,502 height / dpi_scale,
500 ANCHOR_WIDTH.CP(cv_),503 ANCHOR_WIDTH,
501 ANCHOR_HEIGHT.CP(cv_),504 ANCHOR_HEIGHT,
502 -1,505 -1,
503 CORNER_RADIUS.CP(cv_),506 CORNER_RADIUS,
504 blur_coef,507 blur_coef,
505 shadow_color,508 shadow_color,
506 1.0f,509 1.0f,
507 PADDING.CP(cv_),510 PADDING,
508 outline_color);511 outline_color);
509512
510 compute_full_mask(513 compute_full_mask(
511 cr_mask,514 cr_mask,
512 cairo_mask.GetSurface(),515 cairo_mask.GetSurface(),
513 width,516 width / dpi_scale,
514 height,517 height / dpi_scale,
515 CORNER_RADIUS.CP(cv_), // radius,518 CORNER_RADIUS, // radius,
516 RawPixel(16).CP(cv_), // shadow_radius,519 ANCHOR_WIDTH, // anchor_width,
517 ANCHOR_WIDTH.CP(cv_), // anchor_width,520 ANCHOR_HEIGHT, // anchor_height,
518 ANCHOR_HEIGHT.CP(cv_), // anchor_height,
519 -1, // upper_size,521 -1, // upper_size,
520 true, // negative,522 true, // negative,
521 false, // outline,523 false, // outline,
522 1.0, // line_width,524 1.0, // line_width,
523 PADDING.CP(cv_), // padding_size,525 PADDING, // padding_size,
524 mask_color);526 mask_color);
525527
526 cairo_destroy(cr_bg);
527 cairo_destroy(cr_outline);
528 cairo_destroy(cr_mask);
529
530 texture_bg_ = texture_ptr_from_cairo_graphics(cairo_bg);528 texture_bg_ = texture_ptr_from_cairo_graphics(cairo_bg);
531 texture_mask_ = texture_ptr_from_cairo_graphics(cairo_mask);529 texture_mask_ = texture_ptr_from_cairo_graphics(cairo_mask);
532 texture_outline_ = texture_ptr_from_cairo_graphics(cairo_outline);530 texture_outline_ = texture_ptr_from_cairo_graphics(cairo_outline);
533531
=== modified file 'launcher/XdndCollectionWindowImp.cpp'
--- launcher/XdndCollectionWindowImp.cpp 2013-10-29 22:33:02 +0000
+++ launcher/XdndCollectionWindowImp.cpp 2014-03-03 11:01:22 +0000
@@ -55,7 +55,7 @@
55 WindowManager::Default().window_moved.connect(sigc::mem_fun(this, &PrivateWindow::OnWindowMoved));55 WindowManager::Default().window_moved.connect(sigc::mem_fun(this, &PrivateWindow::OnWindowMoved));
56 }56 }
5757
58 void OnScreenChanged(int /*primary*/, std::vector<nux::Geometry>& /*monitors*/)58 void OnScreenChanged(int /*primary*/, std::vector<nux::Geometry> const& /*monitors*/)
59 {59 {
60 auto uscreen = UScreen::GetDefault();60 auto uscreen = UScreen::GetDefault();
61 SetGeometry(uscreen->GetScreenGeometry());61 SetGeometry(uscreen->GetScreenGeometry());
6262
=== modified file 'launcher/XdndManagerImp.cpp'
--- launcher/XdndManagerImp.cpp 2013-10-14 15:59:22 +0000
+++ launcher/XdndManagerImp.cpp 2014-03-03 11:01:22 +0000
@@ -19,6 +19,7 @@
1919
20#include "XdndManagerImp.h"20#include "XdndManagerImp.h"
2121
22#include <algorithm>
22#include "unity-shared/UScreen.h"23#include "unity-shared/UScreen.h"
2324
24namespace unity {25namespace unity {
2526
=== modified file 'panel/PanelController.cpp'
--- panel/PanelController.cpp 2014-02-18 20:11:54 +0000
+++ panel/PanelController.cpp 2014-03-03 11:01:22 +0000
@@ -38,7 +38,7 @@
38class Controller::Impl38class Controller::Impl
39{39{
40public:40public:
41 Impl(menu::Manager::Ptr const&, ui::EdgeBarrierController::Ptr const&);41 Impl(Controller*, menu::Manager::Ptr const&, ui::EdgeBarrierController::Ptr const&);
42 ~Impl();42 ~Impl();
4343
44 // NOTE: nux::Property maybe?44 // NOTE: nux::Property maybe?
@@ -48,14 +48,15 @@
4848
49 float opacity() const;49 float opacity() const;
5050
51 nux::ObjectPtr<PanelView> CreatePanel(Introspectable *iobj);51 nux::ObjectPtr<PanelView> CreatePanel();
52 void OnScreenChanged(unsigned int primary_monitor, std::vector<nux::Geometry>& monitors, Introspectable *iobj);52 void OnScreenChanged(unsigned int primary_monitor, std::vector<nux::Geometry> const& monitors);
53 void UpdatePanelGeometries();53 void UpdatePanelGeometries();
5454
55 typedef nux::ObjectPtr<nux::BaseWindow> BaseWindowPtr;55 typedef nux::ObjectPtr<nux::BaseWindow> BaseWindowPtr;
5656
57 PanelView* ViewForWindow(BaseWindowPtr const& window) const;57 PanelView* ViewForWindow(BaseWindowPtr const& window) const;
5858
59 Controller* parent_;
59 menu::Manager::Ptr indicators_;60 menu::Manager::Ptr indicators_;
60 ui::EdgeBarrierController::Ptr edge_barriers_;61 ui::EdgeBarrierController::Ptr edge_barriers_;
61 PanelVector panels_;62 PanelVector panels_;
@@ -66,12 +67,17 @@
66};67};
6768
6869
69Controller::Impl::Impl(menu::Manager::Ptr const& indicators, ui::EdgeBarrierController::Ptr const& edge_barriers)70Controller::Impl::Impl(Controller* parent, menu::Manager::Ptr const& indicators, ui::EdgeBarrierController::Ptr const& edge_barriers)
70 : indicators_(indicators)71 : parent_(parent)
72 , indicators_(indicators)
71 , edge_barriers_(edge_barriers)73 , edge_barriers_(edge_barriers)
72 , opacity_(1.0f)74 , opacity_(1.0f)
73 , opacity_maximized_toggle_(false)75 , opacity_maximized_toggle_(false)
74{}76{
77 UScreen* screen = UScreen::GetDefault();
78 screen->changed.connect(sigc::mem_fun(this, &Impl::OnScreenChanged));
79 OnScreenChanged(screen->GetPrimaryMonitor(), screen->GetMonitors());
80}
7581
76Controller::Impl::~Impl()82Controller::Impl::~Impl()
77{83{
@@ -132,9 +138,7 @@
132}138}
133139
134// We need to put a panel on every monitor, and try and re-use the panels we already have140// We need to put a panel on every monitor, and try and re-use the panels we already have
135void Controller::Impl::OnScreenChanged(unsigned int primary_monitor,141void Controller::Impl::OnScreenChanged(unsigned int primary_monitor, std::vector<nux::Geometry> const& monitors)
136 std::vector<nux::Geometry>& monitors,
137 Introspectable *iobj)
138{142{
139 unsigned int num_monitors = monitors.size();143 unsigned int num_monitors = monitors.size();
140 unsigned int num_panels = num_monitors;144 unsigned int num_panels = num_monitors;
@@ -147,11 +151,11 @@
147 {151 {
148 if (i >= panels_size)152 if (i >= panels_size)
149 {153 {
150 panels_.push_back(CreatePanel(iobj));154 panels_.push_back(CreatePanel());
151 }155 }
152 else if (!panels_[i])156 else if (!panels_[i])
153 {157 {
154 panels_[i] = CreatePanel(iobj);158 panels_[i] = CreatePanel();
155 }159 }
156160
157 if (panels_[i]->GetMonitor() != static_cast<int>(i))161 if (panels_[i]->GetMonitor() != static_cast<int>(i))
@@ -171,7 +175,7 @@
171 auto const& panel = panels_[i];175 auto const& panel = panels_[i];
172 if (panel)176 if (panel)
173 {177 {
174 iobj->RemoveChild(panel.GetPointer());178 parent_->RemoveChild(panel.GetPointer());
175 panel->GetParent()->UnReference();179 panel->GetParent()->UnReference();
176 edge_barriers_->RemoveHorizontalSubscriber(panel.GetPointer(), panel->GetMonitor());180 edge_barriers_->RemoveHorizontalSubscriber(panel.GetPointer(), panel->GetMonitor());
177 }181 }
@@ -182,7 +186,7 @@
182}186}
183187
184188
185nux::ObjectPtr<PanelView> Controller::Impl::CreatePanel(Introspectable *iobj)189nux::ObjectPtr<PanelView> Controller::Impl::CreatePanel()
186{190{
187 auto* panel_window = new MockableBaseWindow(TEXT("PanelWindow"));191 auto* panel_window = new MockableBaseWindow(TEXT("PanelWindow"));
188192
@@ -205,7 +209,7 @@
205 panel_window->EnableInputWindow(true, panel::window_title, false, false);209 panel_window->EnableInputWindow(true, panel::window_title, false, false);
206210
207 panel_window->InputWindowEnableStruts(true);211 panel_window->InputWindowEnableStruts(true);
208 iobj->AddChild(view);212 parent_->AddChild(view);
209213
210 return nux::ObjectPtr<PanelView>(view);214 return nux::ObjectPtr<PanelView>(view);
211}215}
@@ -228,14 +232,8 @@
228232
229Controller::Controller(menu::Manager::Ptr const& menus, ui::EdgeBarrierController::Ptr const& edge_barriers)233Controller::Controller(menu::Manager::Ptr const& menus, ui::EdgeBarrierController::Ptr const& edge_barriers)
230 : launcher_width(64)234 : launcher_width(64)
231 , pimpl(new Impl(menus, edge_barriers))235 , pimpl(new Impl(this, menus, edge_barriers))
232{236{
233 UScreen* screen = UScreen::GetDefault();
234 screen->changed.connect(sigc::mem_fun(this, &Controller::OnScreenChanged));
235 OnScreenChanged(screen->GetPrimaryMonitor(), screen->GetMonitors());
236
237 unity::Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &Controller::OnDPIChanged));
238
239 launcher_width.changed.connect([this] (int width)237 launcher_width.changed.connect([this] (int width)
240 {238 {
241 pimpl->SetLauncherWidth(width);239 pimpl->SetLauncherWidth(width);
@@ -245,19 +243,6 @@
245Controller::~Controller()243Controller::~Controller()
246{}244{}
247245
248void Controller::OnDPIChanged()
249{
250 for (auto& panel_ptr : pimpl->panels_)
251 {
252 if (panel_ptr)
253 {
254 int monitor = panel_ptr->GetMonitor();
255
256 panel_ptr->SetMonitor(monitor);
257 }
258 }
259}
260
261void Controller::SetOpacity(float opacity)246void Controller::SetOpacity(float opacity)
262{247{
263 pimpl->SetOpacity(opacity);248 pimpl->SetOpacity(opacity);
@@ -299,10 +284,5 @@
299 .add("opacity", pimpl->opacity());284 .add("opacity", pimpl->opacity());
300}285}
301286
302void Controller::OnScreenChanged(int primary_monitor, std::vector<nux::Geometry>& monitors)
303{
304 pimpl->OnScreenChanged(primary_monitor, monitors, this);
305}
306
307} // namespace panel287} // namespace panel
308} // namespace unity288} // namespace unity
309289
=== modified file 'panel/PanelController.h'
--- panel/PanelController.h 2014-02-18 18:27:30 +0000
+++ panel/PanelController.h 2014-03-03 11:01:22 +0000
@@ -61,9 +61,6 @@
61 void AddProperties(debug::IntrospectionData&);61 void AddProperties(debug::IntrospectionData&);
6262
63private:63private:
64 void OnScreenChanged(int primary_monitor, std::vector<nux::Geometry>& monitors);
65 void OnDPIChanged();
66
67 class Impl;64 class Impl;
68 std::unique_ptr<Impl> pimpl;65 std::unique_ptr<Impl> pimpl;
69};66};
7067
=== modified file 'panel/PanelIndicatorEntryDropdownView.cpp'
--- panel/PanelIndicatorEntryDropdownView.cpp 2014-02-18 21:20:28 +0000
+++ panel/PanelIndicatorEntryDropdownView.cpp 2014-03-03 11:01:22 +0000
@@ -144,7 +144,7 @@
144 entries.push_back(entry->GetEntry());144 entries.push_back(entry->GetEntry());
145145
146 auto const& geo = GetAbsoluteGeometry();146 auto const& geo = GetAbsoluteGeometry();
147 indicators_->ShowEntriesDropdown(entries, active_entry_, 0, geo.x, geo.y + Style::Instance().PanelHeight(monitor_));147 indicators_->ShowEntriesDropdown(entries, active_entry_, 0, geo.x, geo.y + geo.height);
148}148}
149149
150bool PanelIndicatorEntryDropdownView::ActivateChild(PanelIndicatorEntryView::Ptr const& child)150bool PanelIndicatorEntryDropdownView::ActivateChild(PanelIndicatorEntryView::Ptr const& child)
151151
=== modified file 'panel/PanelIndicatorEntryView.cpp'
--- panel/PanelIndicatorEntryView.cpp 2014-02-19 02:16:22 +0000
+++ panel/PanelIndicatorEntryView.cpp 2014-03-03 11:01:22 +0000
@@ -19,6 +19,7 @@
19 */19 */
2020
21#include <Nux/Nux.h>21#include <Nux/Nux.h>
22#include <NuxCore/Logger.h>
22#include <UnityCore/ConnectionManager.h>23#include <UnityCore/ConnectionManager.h>
23#include <UnityCore/GTKWrapper.h>24#include <UnityCore/GTKWrapper.h>
2425
@@ -29,17 +30,16 @@
2930
30#include "unity-shared/CairoTexture.h"31#include "unity-shared/CairoTexture.h"
31#include "unity-shared/PanelStyle.h"32#include "unity-shared/PanelStyle.h"
33#include "unity-shared/RawPixel.h"
32#include "unity-shared/WindowManager.h"34#include "unity-shared/WindowManager.h"
33#include "unity-shared/UnitySettings.h"35#include "unity-shared/UnitySettings.h"
3436
35namespace unity37namespace unity
36{38{
37
38namespace39namespace
39{40{
40const RawPixel DEFAULT_SPACING = 3_em;41DECLARE_LOGGER(logger, "unity.panel.indicator.entry");
4142const int DEFAULT_SPACING = 3;
42const int SCALED_IMAGE_Y = 1;
43}43}
4444
45using namespace indicator;45using namespace indicator;
@@ -48,17 +48,14 @@
48 IndicatorEntryType type)48 IndicatorEntryType type)
49 : TextureArea(NUX_TRACKER_LOCATION)49 : TextureArea(NUX_TRACKER_LOCATION)
50 , proxy_(proxy)50 , proxy_(proxy)
51 , spacing_(DEFAULT_SPACING)51 , type_(type)
52 , left_padding_(padding < 0 ? 0 : padding)
53 , right_padding_(left_padding_)
54 , monitor_(0)52 , monitor_(0)
55 , type_(type)
56 , entry_texture_(nullptr)
57 , opacity_(1.0f)53 , opacity_(1.0f)
58 , draw_active_(false)54 , draw_active_(false)
59 , overlay_showing_(false)55 , overlay_showing_(false)
60 , disabled_(false)56 , disabled_(false)
61 , focused_(true)57 , focused_(true)
58 , padding_(padding < 0 ? 0 : padding)
62 , cv_(unity::Settings::Instance().em(monitor_))59 , cv_(unity::Settings::Instance().em(monitor_))
63{60{
64 proxy_->active_changed.connect(sigc::mem_fun(this, &PanelIndicatorEntryView::OnActiveChanged));61 proxy_->active_changed.connect(sigc::mem_fun(this, &PanelIndicatorEntryView::OnActiveChanged));
@@ -73,6 +70,14 @@
73 InputArea::mouse_wheel.connect(sigc::mem_fun(this, &PanelIndicatorEntryView::OnMouseWheel));70 InputArea::mouse_wheel.connect(sigc::mem_fun(this, &PanelIndicatorEntryView::OnMouseWheel));
74 }71 }
7572
73 if (type_ != MENU)
74 {
75 icon_theme_changed_.Connect(gtk_icon_theme_get_default(), "changed", [this] (GtkIconTheme*) {
76 if (proxy_->image_type() && proxy_->image_visible())
77 Refresh();
78 });
79 }
80
76 panel::Style::Instance().changed.connect(sigc::mem_fun(this, &PanelIndicatorEntryView::Refresh));81 panel::Style::Instance().changed.connect(sigc::mem_fun(this, &PanelIndicatorEntryView::Refresh));
77 unity::Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &PanelIndicatorEntryView::Refresh));82 unity::Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &PanelIndicatorEntryView::Refresh));
7883
@@ -115,7 +120,7 @@
115 wm.TerminateScale();120 wm.TerminateScale();
116121
117 auto const& abs_geo = GetAbsoluteGeometry();122 auto const& abs_geo = GetAbsoluteGeometry();
118 proxy_->ShowMenu(abs_geo.x, abs_geo.y + panel::Style::Instance().PanelHeight(monitor_), button);123 proxy_->ShowMenu(abs_geo.x, abs_geo.y + abs_geo.height, button);
119}124}
120125
121void PanelIndicatorEntryView::OnMouseDown(int x, int y, long button_flags, long key_flags)126void PanelIndicatorEntryView::OnMouseDown(int x, int y, long button_flags, long key_flags)
@@ -194,73 +199,59 @@
194 }199 }
195}200}
196201
197glib::Object<GdkPixbuf> PanelIndicatorEntryView::MakePixbuf()202glib::Object<GdkPixbuf> PanelIndicatorEntryView::MakePixbuf(int size)
198{203{
199 glib::Object<GdkPixbuf> pixbuf;204 glib::Object<GdkPixbuf> pixbuf;
200 GtkIconTheme* theme = gtk_icon_theme_get_default();205 auto image_type = proxy_->image_type();
201 int image_type = proxy_->image_type();206
202 RawPixel size = (type_ != DROP_DOWN) ? 24_em : 10_em;207 switch (image_type)
203208 {
204 if (image_type == GTK_IMAGE_PIXBUF)209 case GTK_IMAGE_PIXBUF:
205 {210 {
206 gsize len = 0;211 gsize len = 0;
207 guchar* decoded = g_base64_decode(proxy_->image_data().c_str(), &len);212 auto* decoded = g_base64_decode(proxy_->image_data().c_str(), &len);
208213 glib::Object<GInputStream> stream(g_memory_input_stream_new_from_data(decoded, len, nullptr));
209 glib::Object<GInputStream> stream(g_memory_input_stream_new_from_data(decoded,214 pixbuf = gdk_pixbuf_new_from_stream(stream, nullptr, nullptr);
210 len,215 g_input_stream_close(stream, nullptr, nullptr);
211 nullptr));216 g_free(decoded);
212217 break;
213 pixbuf = gdk_pixbuf_new_from_stream(stream, nullptr, nullptr);218 }
214219
215 g_free(decoded);220 case GTK_IMAGE_ICON_NAME:
216 g_input_stream_close(stream, nullptr, nullptr);221 case GTK_IMAGE_STOCK:
217 }222 case GTK_IMAGE_GICON:
218 else if (image_type == GTK_IMAGE_STOCK ||223 {
219 image_type == GTK_IMAGE_ICON_NAME)224 GtkIconTheme* theme = gtk_icon_theme_get_default();
220 {225 auto flags = static_cast<GtkIconLookupFlags>(0);
221 pixbuf = gtk_icon_theme_load_icon(theme, proxy_->image_data().c_str(), size.CP(cv_),226 gtk::IconInfo info;
222 (GtkIconLookupFlags)0, nullptr);227
223 }228 if (image_type == GTK_IMAGE_GICON)
224 else if (image_type == GTK_IMAGE_GICON)229 {
225 {230 glib::Object<GIcon> icon(g_icon_new_for_string(proxy_->image_data().c_str(), nullptr));
226 glib::Object<GIcon> icon(g_icon_new_for_string(proxy_->image_data().c_str(), nullptr));231 info = gtk_icon_theme_lookup_by_gicon(theme, icon, size, flags);
227232 }
228 gtk::IconInfo info(gtk_icon_theme_lookup_by_gicon(theme, icon, size.CP(cv_),233 else
229 (GtkIconLookupFlags)0));234 {
230 if (info)235 info = gtk_icon_theme_lookup_icon(theme, proxy_->image_data().c_str(), size, flags);
231 pixbuf = gtk_icon_info_load_icon(info, nullptr);236 }
237
238 if (info)
239 {
240 auto* filename = gtk_icon_info_get_filename(info);
241 pixbuf = gdk_pixbuf_new_from_file_at_size(filename, -1, size, nullptr);
242 }
243 else if (image_type == GTK_IMAGE_ICON_NAME)
244 {
245 pixbuf = gdk_pixbuf_new_from_file_at_size(proxy_->image_data().c_str(), -1, size, nullptr);
246 }
247
248 break;
249 }
232 }250 }
233251
234 return pixbuf;252 return pixbuf;
235}253}
236254
237int PanelIndicatorEntryView::PixbufWidth(glib::Object<GdkPixbuf> const& pixbuf) const
238{
239 int image_type = proxy_->image_type();
240 if (image_type == GTK_IMAGE_PIXBUF)
241 {
242 return RawPixel(gdk_pixbuf_get_width(pixbuf)).CP(cv_);
243 }
244 else
245 {
246 return gdk_pixbuf_get_width(pixbuf);
247 }
248}
249
250int PanelIndicatorEntryView::PixbufHeight(glib::Object<GdkPixbuf> const& pixbuf) const
251{
252 int image_type = proxy_->image_type();
253 if (image_type == GTK_IMAGE_PIXBUF)
254 {
255 return RawPixel(gdk_pixbuf_get_height(pixbuf)).CP(cv_);
256 }
257 else
258 {
259 return gdk_pixbuf_get_height(pixbuf);
260 }
261
262}
263
264void PanelIndicatorEntryView::DrawEntryPrelight(cairo_t* cr, unsigned int width, unsigned int height)255void PanelIndicatorEntryView::DrawEntryPrelight(cairo_t* cr, unsigned int width, unsigned int height)
265{256{
266 GtkStyleContext* style_context = panel::Style::Instance().GetStyleContext();257 GtkStyleContext* style_context = panel::Style::Instance().GetStyleContext();
@@ -285,22 +276,9 @@
285 gtk_style_context_restore(style_context);276 gtk_style_context_restore(style_context);
286}277}
287278
288// FIXME Remove me when icons for the indicators aren't stuck as 22x22 images...279void PanelIndicatorEntryView::DrawEntryContent(cairo_t *cr, unsigned int width, unsigned int height, glib::Object<GdkPixbuf> const& pixbuf, bool icon_scalable, glib::Object<PangoLayout> const& layout)
289void PanelIndicatorEntryView::ScaleImageIcons(cairo_t* cr, int* x, int* y)280{
290{281 int x = padding_;
291 int image_type = proxy_->image_type();
292 if (image_type == GTK_IMAGE_PIXBUF)
293 {
294 float aspect = cv_->DPIScale();
295 *x = left_padding_;
296 *y = SCALED_IMAGE_Y;
297 cairo_scale(cr, aspect, aspect);
298 }
299}
300
301void PanelIndicatorEntryView::DrawEntryContent(cairo_t *cr, unsigned int width, unsigned int height, glib::Object<GdkPixbuf> const& pixbuf, glib::Object<PangoLayout> const& layout)
302{
303 int x = left_padding_.CP(cv_);
304282
305 if (IsActive())283 if (IsActive())
306 DrawEntryPrelight(cr, width, height);284 DrawEntryPrelight(cr, width, height);
@@ -308,7 +286,7 @@
308 if (pixbuf && IsIconVisible())286 if (pixbuf && IsIconVisible())
309 {287 {
310 GtkStyleContext* style_context = panel::Style::Instance().GetStyleContext();288 GtkStyleContext* style_context = panel::Style::Instance().GetStyleContext();
311 unsigned int icon_width = PixbufWidth(pixbuf);289 unsigned int icon_width = gdk_pixbuf_get_width(pixbuf);
312290
313 gtk_style_context_save(style_context);291 gtk_style_context_save(style_context);
314292
@@ -330,7 +308,17 @@
330 gtk_style_context_set_state(style_context, GTK_STATE_FLAG_PRELIGHT);308 gtk_style_context_set_state(style_context, GTK_STATE_FLAG_PRELIGHT);
331 }309 }
332310
333 int y = (int)((height - PixbufHeight(pixbuf)) / 2);311 int y = (height - gdk_pixbuf_get_height(pixbuf)) / 2;
312
313 if (icon_scalable)
314 {
315 double dpi_scale = cv_->DPIScale();
316 cairo_save(cr);
317 cairo_scale(cr, 1.0f/dpi_scale, 1.0f/dpi_scale);
318 x = padding_ * dpi_scale;
319 y = (std::ceil(height * dpi_scale) - gdk_pixbuf_get_height(pixbuf)) / 2;
320 icon_width /= dpi_scale;
321 }
334322
335 if (overlay_showing_ && !IsActive())323 if (overlay_showing_ && !IsActive())
336 {324 {
@@ -339,9 +327,6 @@
339 * a white square. It works surprisingly well for most symbolic-type327 * a white square. It works surprisingly well for most symbolic-type
340 * icon themes/icons.328 * icon themes/icons.
341 */329 */
342 cairo_save(cr);
343 ScaleImageIcons(cr, &x, &y);
344
345 cairo_push_group(cr);330 cairo_push_group(cr);
346 gdk_cairo_set_source_pixbuf(cr, pixbuf, x, y);331 gdk_cairo_set_source_pixbuf(cr, pixbuf, x, y);
347 cairo_paint_with_alpha(cr, (IsIconSensitive() && IsFocused()) ? 1.0 : 0.5);332 cairo_paint_with_alpha(cr, (IsIconSensitive() && IsFocused()) ? 1.0 : 0.5);
@@ -353,36 +338,29 @@
353 cairo_mask(cr, pat);338 cairo_mask(cr, pat);
354339
355 cairo_pattern_destroy(pat);340 cairo_pattern_destroy(pat);
356 cairo_restore(cr);
357 }341 }
358 else342 else
359 {343 {
360 cairo_save(cr);
361 ScaleImageIcons(cr, &x, &y);
362
363 cairo_push_group(cr);344 cairo_push_group(cr);
364 gtk_render_icon(style_context, cr, pixbuf, x, y);345 gtk_render_icon(style_context, cr, pixbuf, x, y);
365 cairo_pop_group_to_source(cr);346 cairo_pop_group_to_source(cr);
366 cairo_paint_with_alpha(cr, (IsIconSensitive() && IsFocused()) ? 1.0 : 0.5);347 cairo_paint_with_alpha(cr, (IsIconSensitive() && IsFocused()) ? 1.0 : 0.5);
367
368 cairo_restore(cr);
369 }348 }
370349
371 gtk_widget_path_free(widget_path);350 gtk_widget_path_free(widget_path);
372
373 gtk_style_context_restore(style_context);351 gtk_style_context_restore(style_context);
374352
375 x += icon_width + spacing_.CP(cv_);353 if (icon_scalable)
354 {
355 cairo_restore(cr);
356 x = padding_;
357 }
358
359 x += icon_width + DEFAULT_SPACING;
376 }360 }
377361
378 if (layout)362 if (layout)
379 {363 {
380 PangoRectangle log_rect;
381 pango_layout_get_extents(layout, nullptr, &log_rect);
382 unsigned int text_height = log_rect.height / PANGO_SCALE;
383
384 pango_cairo_update_layout(cr, layout);
385
386 GtkStyleContext* style_context = panel::Style::Instance().GetStyleContext();364 GtkStyleContext* style_context = panel::Style::Instance().GetStyleContext();
387365
388 gtk_style_context_save(style_context);366 gtk_style_context_save(style_context);
@@ -405,7 +383,9 @@
405 gtk_style_context_set_state(style_context, GTK_STATE_FLAG_PRELIGHT);383 gtk_style_context_set_state(style_context, GTK_STATE_FLAG_PRELIGHT);
406 }384 }
407385
408 int y = (height - text_height) / 2;386 nux::Size extents;
387 pango_layout_get_pixel_size(layout, &extents.width, &extents.height);
388 int y = (height - extents.height) / 2;
409389
410 if (overlay_showing_)390 if (overlay_showing_)
411 {391 {
@@ -446,88 +426,79 @@
446 cairo_t* cr;426 cairo_t* cr;
447427
448 std::string label = GetLabel();428 std::string label = GetLabel();
449 glib::Object<GdkPixbuf> const& pixbuf = MakePixbuf();429 auto& panel_style = panel::Style::Instance();
450430
451 unsigned int width = 0;431 double dpi_scale = cv_->DPIScale();
452 unsigned int icon_width = 0;432 int width = 0;
453 unsigned int height = panel::Style::Instance().PanelHeight(monitor_);433 int height = panel_style.PanelHeight(monitor_) / dpi_scale;
434 int icon_width = 0;
435
436 int icon_size = RawPixel((type_ != DROP_DOWN) ? 22 : 10).CP(dpi_scale);
437 glib::Object<GdkPixbuf> const& pixbuf = MakePixbuf(icon_size);
438 bool icon_scalable = false;
454439
455 // First lets figure out our size440 // First lets figure out our size
456 if (pixbuf && IsIconVisible())441 if (pixbuf && IsIconVisible())
457 {442 {
458 width = PixbufWidth(pixbuf);443 width = gdk_pixbuf_get_width(pixbuf);
444
445 if (gdk_pixbuf_get_height(pixbuf) == icon_size)
446 {
447 icon_scalable = true;
448 width /= dpi_scale;
449 }
450
459 icon_width = width;451 icon_width = width;
460 }452 }
461453
462 if (!label.empty() && IsLabelVisible())454 if (!label.empty() && IsLabelVisible())
463 {455 {
464 using namespace panel;
465 PangoContext* cxt;
466 PangoAttrList* attrs = nullptr;456 PangoAttrList* attrs = nullptr;
467 PangoRectangle log_rect;457 auto panel_item = (type_ == MENU) ? panel::PanelItem::MENU : panel::PanelItem::INDICATOR;
468 GdkScreen* screen = gdk_screen_get_default();458 std::string const& font = panel_style.GetFontDescription(panel_item);
469 PangoFontDescription* desc = nullptr;
470 PanelItem panel_item = (type_ == MENU) ? PanelItem::MENU : PanelItem::INDICATOR;
471
472 Style& panel_style = Style::Instance();
473 std::string const& font_description = panel_style.GetFontDescription(panel_item);
474 int dpi = panel_style.GetTextDPI();
475459
476 if (proxy_->show_now())460 if (proxy_->show_now())
477 {461 {
478 if (!pango_parse_markup(label.c_str(), -1, '_', &attrs, nullptr, nullptr, nullptr))462 if (!pango_parse_markup(label.c_str(), -1, '_', &attrs, nullptr, nullptr, nullptr))
479 {463 {
480 g_debug("pango_parse_markup failed");464 LOG_WARN(logger) << "Pango markup parsing failed";
481 }465 }
482 }466 }
483467
484 desc = pango_font_description_from_string(font_description.c_str());468 glib::Object<PangoContext> context(gdk_pango_context_get_for_screen(gdk_screen_get_default()));
485 pango_font_description_set_weight(desc, PANGO_WEIGHT_NORMAL);469 std::shared_ptr<PangoFontDescription> desc(pango_font_description_from_string(font.c_str()), pango_font_description_free);
486470 pango_context_set_font_description(context, desc.get());
487 nux::CairoGraphics cairo_graphics(CAIRO_FORMAT_ARGB32, 1, 1);471 pango_context_set_language(context, gtk_get_default_language());
488 cr = cairo_graphics.GetInternalContext();
489
490 layout = pango_cairo_create_layout(cr);
491 if (attrs)
492 {
493 pango_layout_set_attributes(layout, attrs);
494 pango_attr_list_unref(attrs);
495 }
496
497 pango_layout_set_font_description(layout, desc);
498472
499 label.erase(std::remove(label.begin(), label.end(), '_'), label.end());473 label.erase(std::remove(label.begin(), label.end(), '_'), label.end());
474 layout = pango_layout_new(context);
475 pango_layout_set_height(layout, -1); //avoid wrap lines
500 pango_layout_set_text(layout, label.c_str(), -1);476 pango_layout_set_text(layout, label.c_str(), -1);
501477 pango_layout_set_attributes(layout, attrs);
502 cxt = pango_layout_get_context(layout);478 pango_attr_list_unref(attrs);
503 pango_cairo_context_set_font_options(cxt, gdk_screen_get_font_options(screen));479
504 pango_cairo_context_set_resolution(cxt, dpi / static_cast<float>(PANGO_SCALE));480 nux::Size extents;
505 pango_layout_context_changed(layout);481 pango_layout_get_pixel_size(layout, &extents.width, &extents.height);
506
507 pango_layout_get_extents(layout, nullptr, &log_rect);
508 unsigned int text_width = log_rect.width / PANGO_SCALE;
509482
510 if (icon_width)483 if (icon_width)
511 width += spacing_.CP(cv_);484 width += DEFAULT_SPACING;
512 width += text_width;
513485
514 pango_font_description_free(desc);486 width += extents.width;
515 }487 }
516488
517 if (width)489 if (width)
518 width += left_padding_.CP(cv_) + right_padding_.CP(cv_);490 width += padding_ * 2;
519491
520 SetMinimumWidth(width);492 SetMinMaxSize(std::ceil(width * dpi_scale), std::ceil(height * dpi_scale));
521 SetMaximumWidth(width);493 nux::CairoGraphics cg(CAIRO_FORMAT_ARGB32, GetWidth(), GetHeight());
522494 cairo_surface_set_device_scale(cg.GetSurface(), dpi_scale, dpi_scale);
523 nux::CairoGraphics cg(CAIRO_FORMAT_ARGB32, width, height);
524 cr = cg.GetInternalContext();495 cr = cg.GetInternalContext();
525 cairo_set_line_width(cr, 1);496 cairo_set_line_width(cr, 1);
526 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);497 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
527 cairo_paint(cr);498 cairo_paint(cr);
528499
529 cairo_set_operator(cr, CAIRO_OPERATOR_OVER);500 cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
530 DrawEntryContent(cr, width, height, pixbuf, layout);501 DrawEntryContent(cr, width, height, pixbuf, icon_scalable, layout);
531502
532 entry_texture_ = texture_ptr_from_cairo_graphics(cg);503 entry_texture_ = texture_ptr_from_cairo_graphics(cg);
533 SetTexture(entry_texture_.GetPointer());504 SetTexture(entry_texture_.GetPointer());
@@ -582,9 +553,12 @@
582553
583void PanelIndicatorEntryView::SetMonitor(int monitor)554void PanelIndicatorEntryView::SetMonitor(int monitor)
584{555{
556 if (monitor_ == monitor)
557 return;
558
585 monitor_ = monitor;559 monitor_ = monitor;
586560 cv_ = Settings::Instance().em(monitor);
587 cv_ = unity::Settings::Instance().em(monitor);561 Refresh();
588}562}
589563
590void PanelIndicatorEntryView::SetOpacity(double opacity)564void PanelIndicatorEntryView::SetOpacity(double opacity)
591565
=== modified file 'panel/PanelIndicatorEntryView.h'
--- panel/PanelIndicatorEntryView.h 2014-02-19 02:16:22 +0000
+++ panel/PanelIndicatorEntryView.h 2014-03-03 11:01:22 +0000
@@ -34,7 +34,6 @@
3434
35#include "unity-shared/EMConverter.h"35#include "unity-shared/EMConverter.h"
36#include "unity-shared/Introspectable.h"36#include "unity-shared/Introspectable.h"
37#include "unity-shared/RawPixel.h"
3837
3938
40namespace unity39namespace unity
@@ -102,7 +101,7 @@
102 virtual void Draw(nux::GraphicsEngine& GfxContext, bool force_draw);101 virtual void Draw(nux::GraphicsEngine& GfxContext, bool force_draw);
103 virtual void DrawEntryPrelight(cairo_t* cr, unsigned int w, unsigned int h);102 virtual void DrawEntryPrelight(cairo_t* cr, unsigned int w, unsigned int h);
104 virtual void DrawEntryContent(cairo_t* cr, unsigned int width, unsigned int height,103 virtual void DrawEntryContent(cairo_t* cr, unsigned int width, unsigned int height,
105 glib::Object<GdkPixbuf> const& pixbuf,104 glib::Object<GdkPixbuf> const& pixbuf, bool scalable,
106 glib::Object<PangoLayout> const& layout);105 glib::Object<PangoLayout> const& layout);
107106
108 void Refresh();107 void Refresh();
@@ -110,11 +109,6 @@
110 virtual void ShowMenu(int button = 1);109 virtual void ShowMenu(int button = 1);
111110
112 indicator::Entry::Ptr proxy_;111 indicator::Entry::Ptr proxy_;
113 RawPixel spacing_;
114 RawPixel left_padding_;
115 RawPixel right_padding_;
116
117 int monitor_;
118112
119private:113private:
120 void OnMouseDown(int x, int y, long button_flags, long key_flags);114 void OnMouseDown(int x, int y, long button_flags, long key_flags);
@@ -122,21 +116,19 @@
122 void OnMouseWheel(int x, int y, int delta, unsigned long mouse_state, unsigned long key_state);116 void OnMouseWheel(int x, int y, int delta, unsigned long mouse_state, unsigned long key_state);
123 void OnActiveChanged(bool is_active);117 void OnActiveChanged(bool is_active);
124118
125 int PixbufWidth(glib::Object<GdkPixbuf> const& pixbuf) const;119 glib::Object<GdkPixbuf> MakePixbuf(int size);
126 int PixbufHeight(glib::Object<GdkPixbuf> const& pixbuf) const;
127
128 void ScaleImageIcons(cairo_t* cr, int* x, int* y);
129
130 glib::Object<GdkPixbuf> MakePixbuf();
131120
132 IndicatorEntryType type_;121 IndicatorEntryType type_;
133 nux::ObjectPtr<nux::BaseTexture> entry_texture_;122 nux::ObjectPtr<nux::BaseTexture> entry_texture_;
134 nux::Geometry cached_geo_;123 nux::Geometry cached_geo_;
124 glib::Signal<void, GtkIconTheme*> icon_theme_changed_;
125 int monitor_;
135 double opacity_;126 double opacity_;
136 bool draw_active_;127 bool draw_active_;
137 bool overlay_showing_;128 bool overlay_showing_;
138 bool disabled_;129 bool disabled_;
139 bool focused_;130 bool focused_;
131 int padding_;
140132
141 EMConverter::Ptr cv_;133 EMConverter::Ptr cv_;
142};134};
143135
=== modified file 'panel/PanelIndicatorsView.cpp'
--- panel/PanelIndicatorsView.cpp 2014-02-19 02:16:22 +0000
+++ panel/PanelIndicatorsView.cpp 2014-03-03 11:01:22 +0000
@@ -381,6 +381,9 @@
381void PanelIndicatorsView::SetMonitor(int monitor)381void PanelIndicatorsView::SetMonitor(int monitor)
382{382{
383 monitor_ = monitor;383 monitor_ = monitor;
384
385 for (auto const& entry : entries_)
386 entry.second->SetMonitor(monitor_);
384}387}
385388
386bool PanelIndicatorsView::SetOpacity(double& target, double const& new_value)389bool PanelIndicatorsView::SetOpacity(double& target, double const& new_value)
387390
=== modified file 'panel/PanelMenuView.cpp'
--- panel/PanelMenuView.cpp 2014-02-19 02:16:22 +0000
+++ panel/PanelMenuView.cpp 2014-03-03 11:01:22 +0000
@@ -99,12 +99,13 @@
99 titlebar_grab_area_->UnParentObject();99 titlebar_grab_area_->UnParentObject();
100}100}
101101
102void PanelMenuView::OnDPIChanged()102void PanelMenuView::OnStyleChanged()
103{103{
104 int height = panel::Style::Instance().PanelHeight(monitor_);104 int height = panel::Style::Instance().PanelHeight(monitor_);
105 window_buttons_->SetMinimumHeight(height);
105 window_buttons_->SetMaximumHeight(height);106 window_buttons_->SetMaximumHeight(height);
106 window_buttons_->UpdateDPIChanged();107 window_buttons_->UpdateDPIChanged();
107 window_buttons_->ComputeContentSize();108
108 layout_->SetLeftAndRightPadding(window_buttons_->GetContentWidth(), 0);109 layout_->SetLeftAndRightPadding(window_buttons_->GetContentWidth(), 0);
109110
110 Refresh(true);111 Refresh(true);
@@ -126,8 +127,7 @@
126 mouse_leave.connect(sigc::mem_fun(this, &PanelMenuView::OnPanelViewMouseLeave));127 mouse_leave.connect(sigc::mem_fun(this, &PanelMenuView::OnPanelViewMouseLeave));
127 opacity_animator_.updated.connect(sigc::mem_fun(this, &PanelMenuView::OnFadeAnimatorUpdated));128 opacity_animator_.updated.connect(sigc::mem_fun(this, &PanelMenuView::OnFadeAnimatorUpdated));
128 entry_added.connect(sigc::mem_fun(this, &PanelMenuView::OnEntryViewAdded));129 entry_added.connect(sigc::mem_fun(this, &PanelMenuView::OnEntryViewAdded));
129130 Style::Instance().changed.connect(sigc::mem_fun(this, &PanelMenuView::OnStyleChanged));
130 Style::Instance().changed.connect(sigc::mem_fun(this, &PanelMenuView::OnDPIChanged));
131131
132 auto const& deco_style = decoration::Style::Get();132 auto const& deco_style = decoration::Style::Get();
133 lim_changed_connection_ = deco_style->integrated_menus.changed.connect([this] (bool lim) {133 lim_changed_connection_ = deco_style->integrated_menus.changed.connect([this] (bool lim) {
@@ -167,7 +167,6 @@
167{167{
168 layout_->SetContentDistribution(nux::MAJOR_POSITION_START);168 layout_->SetContentDistribution(nux::MAJOR_POSITION_START);
169 layout_->SetLeftAndRightPadding(window_buttons_->GetContentWidth(), 0);169 layout_->SetLeftAndRightPadding(window_buttons_->GetContentWidth(), 0);
170 layout_->SetBaseHeight(panel::Style::Instance().PanelHeight(monitor_));
171}170}
172171
173void PanelMenuView::SetupTitlebarGrabArea()172void PanelMenuView::SetupTitlebarGrabArea()
@@ -786,26 +785,28 @@
786 auto const& style = decoration::Style::Get();785 auto const& style = decoration::Style::Get();
787 auto text_size = style->TitleNaturalSize(label);786 auto text_size = style->TitleNaturalSize(label);
788 auto state = WidgetState::NORMAL;787 auto state = WidgetState::NORMAL;
788 float dpi_scale = Settings::Instance().em(monitor_)->DPIScale();
789789
790 if (integrated_menus_ && !is_desktop_focused_ && !WindowManager::Default().IsScaleActive())790 if (integrated_menus_ && !is_desktop_focused_ && !WindowManager::Default().IsScaleActive())
791 {791 {
792 title_geo_.x = geo.x + window_buttons_->GetBaseWidth() + style->TitleIndent();792 title_geo_.x = geo.x + window_buttons_->GetBaseWidth() + (style->TitleIndent() * dpi_scale);
793793
794 if (!window_buttons_->focused())794 if (!window_buttons_->focused())
795 state = WidgetState::BACKDROP;795 state = WidgetState::BACKDROP;
796 }796 }
797 else797 else
798 {798 {
799 title_geo_.x = geo.x + MAIN_LEFT_PADDING + TITLE_PADDING;799 title_geo_.x = geo.x + (MAIN_LEFT_PADDING + TITLE_PADDING) * dpi_scale;
800 }800 }
801801
802 title_geo_.y = geo.y + (geo.height - text_size.height) / 2;802 title_geo_.y = geo.y + (geo.height - (text_size.height * dpi_scale)) / 2;
803 title_geo_.width = std::min(text_size.width, geo.width - title_geo_.x);803 title_geo_.width = std::min<int>(std::ceil(text_size.width * dpi_scale), geo.width - title_geo_.x);
804 title_geo_.height = text_size.height;804 title_geo_.height = std::ceil(text_size.height * dpi_scale);
805805
806 nux::CairoGraphics cairo_graphics(CAIRO_FORMAT_ARGB32, title_geo_.width, title_geo_.height);806 nux::CairoGraphics cairo_graphics(CAIRO_FORMAT_ARGB32, title_geo_.width, title_geo_.height);
807 cairo_surface_set_device_scale(cairo_graphics.GetSurface(), dpi_scale, dpi_scale);
807 cairo_t* cr = cairo_graphics.GetInternalContext();808 cairo_t* cr = cairo_graphics.GetInternalContext();
808 style->DrawTitle(label, state, cr, title_geo_.width, title_geo_.height);809 style->DrawTitle(label, state, cr, title_geo_.width / dpi_scale, title_geo_.height / dpi_scale);
809 title_texture_ = texture_ptr_from_cairo_graphics(cairo_graphics);810 title_texture_ = texture_ptr_from_cairo_graphics(cairo_graphics);
810}811}
811812
@@ -1685,9 +1686,9 @@
16851686
1686void PanelMenuView::SetMonitor(int monitor)1687void PanelMenuView::SetMonitor(int monitor)
1687{1688{
1688 monitor_ = monitor;1689 PanelIndicatorsView::SetMonitor(monitor);
1690
1689 monitor_geo_ = UScreen::GetDefault()->GetMonitorGeometry(monitor_);1691 monitor_geo_ = UScreen::GetDefault()->GetMonitorGeometry(monitor_);
1690
1691 maximized_set_.clear();1692 maximized_set_.clear();
1692 GList* windows = bamf_matcher_get_window_stack_for_monitor(matcher_, monitor_);1693 GList* windows = bamf_matcher_get_window_stack_for_monitor(matcher_, monitor_);
16931694
@@ -1722,6 +1723,7 @@
1722 window_buttons_->monitor = monitor_;1723 window_buttons_->monitor = monitor_;
1723 window_buttons_->controlled_window = buttons_win;1724 window_buttons_->controlled_window = buttons_win;
17241725
1726 OnStyleChanged();
1725 g_list_free(windows);1727 g_list_free(windows);
1726}1728}
17271729
17281730
=== modified file 'panel/PanelMenuView.h'
--- panel/PanelMenuView.h 2014-02-19 02:16:22 +0000
+++ panel/PanelMenuView.h 2014-03-03 11:01:22 +0000
@@ -59,8 +59,6 @@
59 virtual void OverlayShown();59 virtual void OverlayShown();
60 virtual void OverlayHidden();60 virtual void OverlayHidden();
6161
62 void OnDPIChanged();
63
64protected:62protected:
65 std::string GetName() const;63 std::string GetName() const;
66 void AddProperties(debug::IntrospectionData&);64 void AddProperties(debug::IntrospectionData&);
@@ -92,6 +90,7 @@
92 void OnActiveWindowChanged(BamfMatcher* matcher, BamfView* old_view, BamfView* new_view);90 void OnActiveWindowChanged(BamfMatcher* matcher, BamfView* old_view, BamfView* new_view);
93 void OnActiveAppChanged(BamfMatcher* matcher, BamfApplication* old_app, BamfApplication* new_app);91 void OnActiveAppChanged(BamfMatcher* matcher, BamfApplication* old_app, BamfApplication* new_app);
94 void OnNameChanged(BamfView* bamf_view, gchar* new_name, gchar* old_name);92 void OnNameChanged(BamfView* bamf_view, gchar* new_name, gchar* old_name);
93 void OnStyleChanged();
9594
96 void OnSpreadInitiate();95 void OnSpreadInitiate();
97 void OnSpreadTerminate();96 void OnSpreadTerminate();
9897
=== modified file 'panel/PanelView.cpp'
--- panel/PanelView.cpp 2014-02-18 21:20:28 +0000
+++ panel/PanelView.cpp 2014-03-03 11:01:22 +0000
@@ -73,7 +73,7 @@
73{73{
74 auto& wm = WindowManager::Default();74 auto& wm = WindowManager::Default();
75 panel::Style::Instance().changed.connect(sigc::mem_fun(this, &PanelView::ForceUpdateBackground));75 panel::Style::Instance().changed.connect(sigc::mem_fun(this, &PanelView::ForceUpdateBackground));
76 unity::Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &PanelView::OnDPIChanged));76 Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &PanelView::Resize));
7777
78 wm.average_color.changed.connect(sigc::mem_fun(this, &PanelView::OnBackgroundUpdate));78 wm.average_color.changed.connect(sigc::mem_fun(this, &PanelView::OnBackgroundUpdate));
79 wm.initiate_spread.connect(sigc::mem_fun(this, &PanelView::OnSpreadInitiate));79 wm.initiate_spread.connect(sigc::mem_fun(this, &PanelView::OnSpreadInitiate));
@@ -171,13 +171,6 @@
171 return tray_->xid();171 return tray_->xid();
172}172}
173173
174void PanelView::OnDPIChanged()
175{
176 int height = panel::Style::Instance().PanelHeight(monitor_);
177 tray_->SetMinMaxSize(1, height);
178 menu_view_->OnDPIChanged();
179}
180
181void PanelView::SetLauncherWidth(int width)174void PanelView::SetLauncherWidth(int width)
182{175{
183 launcher_width_ = width;176 launcher_width_ = width;
@@ -475,7 +468,6 @@
475468
476 refine_geo.x = refine_x_pos;469 refine_geo.x = refine_x_pos;
477 refine_geo.width = bg_refine_tex_->GetWidth();470 refine_geo.width = bg_refine_tex_->GetWidth();
478 refine_geo.height = bg_refine_tex_->GetHeight();
479471
480 if (!Settings::Instance().GetLowGfxMode())472 if (!Settings::Instance().GetLowGfxMode())
481 {473 {
@@ -484,7 +476,6 @@
484476
485 refine_geo.x += refine_geo.width;477 refine_geo.x += refine_geo.width;
486 refine_geo.width = geo.width;478 refine_geo.width = geo.width;
487 refine_geo.height = geo.height;
488 nux::GetPainter().PushLayer(GfxContext, refine_geo, bg_refine_single_column_layer_.get());479 nux::GetPainter().PushLayer(GfxContext, refine_geo, bg_refine_single_column_layer_.get());
489 bgs++;480 bgs++;
490 }481 }
@@ -800,21 +791,24 @@
800 monitor_ = monitor;791 monitor_ = monitor;
801 menu_view_->SetMonitor(monitor);792 menu_view_->SetMonitor(monitor);
802 indicators_->SetMonitor(monitor);793 indicators_->SetMonitor(monitor);
803794 Resize();
804 int height = panel::Style::Instance().PanelHeight(monitor_);
805 SetMinMaxSize(height, height);
806
807 UScreen* uscreen = UScreen::GetDefault();
808 auto monitor_geo = uscreen->GetMonitorGeometry(monitor);
809 Resize(nux::Point(monitor_geo.x, monitor_geo.y), monitor_geo.width);
810}795}
811796
812void PanelView::Resize(nux::Point const& offset, int width)797void PanelView::Resize()
813{798{
814 unity::panel::Style &panel_style = panel::Style::Instance();799 int height = Style::Instance().PanelHeight(monitor_);
815 SetMaximumWidth(width);800 auto const& monitor_geo = UScreen::GetDefault()->GetMonitorGeometry(monitor_);
816 SetGeometry(nux::Geometry(0, 0, width, panel_style.PanelHeight(monitor_)));801
817 parent_->SetGeometry(nux::Geometry(offset.x, offset.y, width, panel_style.PanelHeight(monitor_)));802 SetMinMaxSize(monitor_geo.width, height);
803 parent_->SetGeometry({monitor_geo.x, monitor_geo.y, monitor_geo.width, height});
804
805 for (auto* child : layout_->GetChildren())
806 {
807 child->SetMinimumHeight(height);
808 child->SetMaximumHeight(height);
809 }
810
811 QueueRelayout();
818}812}
819813
820int PanelView::GetMonitor() const814int PanelView::GetMonitor() const
821815
=== modified file 'panel/PanelView.h'
--- panel/PanelView.h 2014-02-18 21:20:28 +0000
+++ panel/PanelView.h 2014-03-03 11:01:22 +0000
@@ -104,15 +104,13 @@
104104
105 bool ActivateFirstSensitive();105 bool ActivateFirstSensitive();
106 bool ActivateEntry(std::string const& entry_id);106 bool ActivateEntry(std::string const& entry_id);
107 void Resize(nux::Point const& offset, int width);107 void Resize();
108 bool IsTransparent();108 bool IsTransparent();
109 void UpdateBackground();109 void UpdateBackground();
110 void ForceUpdateBackground();110 void ForceUpdateBackground();
111 bool TrackMenuPointer();111 bool TrackMenuPointer();
112 void SyncGeometries();112 void SyncGeometries();
113 void AddPanelView(PanelIndicatorsView* child, unsigned int stretchFactor);113 void AddPanelView(PanelIndicatorsView* child, unsigned int stretchFactor);
114
115 void OnDPIChanged();
116114
117 MockableBaseWindow* parent_;115 MockableBaseWindow* parent_;
118 indicator::Indicators::Ptr remote_;116 indicator::Indicators::Ptr remote_;
119117
=== modified file 'plugins/unityshell/src/unityshell.cpp'
--- plugins/unityshell/src/unityshell.cpp 2014-02-19 02:16:22 +0000
+++ plugins/unityshell/src/unityshell.cpp 2014-03-03 11:01:22 +0000
@@ -890,10 +890,12 @@
890890
891void UnityScreen::DrawPanelUnderDash()891void UnityScreen::DrawPanelUnderDash()
892{892{
893 if (!paint_panel_under_dash_ || !launcher_controller_->IsOverlayOpen())893 if (!paint_panel_under_dash_ || (!dash_controller_->IsVisible() && !hud_controller_->IsVisible()))
894 return;894 return;
895895
896 if (_last_output->id() != screen->currentOutputDev().id())896 auto const& output_dev = screen->currentOutputDev();
897
898 if (_last_output->id() != output_dev.id())
897 return;899 return;
898900
899 auto graphics_engine = nux::GetGraphicsDisplay()->GetGraphicsEngine();901 auto graphics_engine = nux::GetGraphicsDisplay()->GetGraphicsEngine();
@@ -904,18 +906,17 @@
904 graphics_engine->ResetModelViewMatrixStack();906 graphics_engine->ResetModelViewMatrixStack();
905 graphics_engine->Push2DTranslationModelViewMatrix(0.0f, 0.0f, 0.0f);907 graphics_engine->Push2DTranslationModelViewMatrix(0.0f, 0.0f, 0.0f);
906 graphics_engine->ResetProjectionMatrix();908 graphics_engine->ResetProjectionMatrix();
907 graphics_engine->SetOrthographicProjectionMatrix(screen->width(), screen->height());909 graphics_engine->SetOrthographicProjectionMatrix(output_dev.width(), output_dev.height());
908910
909 nux::TexCoordXForm texxform;911 nux::TexCoordXForm texxform;
910 texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_CLAMP);912 texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_CLAMP);
911913
912 // FIXME Change to paint per monitor vs all at once914 int monitor = WindowManager::Default().MonitorGeometryIn(NuxGeometryFromCompRect(output_dev));
913 int panel_height = panel_style_.PanelHeight();915 auto const& texture = panel_style_.GetBackground(monitor)->GetDeviceTexture();
914 auto const& texture = panel_style_.GetBackground()->GetDeviceTexture();916 graphics_engine->QRP_GLSL_1Tex(0, 0, output_dev.width(), texture->GetHeight(), texture, texxform, nux::color::White);
915 graphics_engine->QRP_GLSL_1Tex(0, 0, screen->width(), panel_height, texture, texxform, nux::color::White);
916}917}
917918
918bool UnityScreen::forcePaintOnTop ()919bool UnityScreen::forcePaintOnTop()
919{920{
920 return !allowWindowPaint ||921 return !allowWindowPaint ||
921 ((switcher_controller_->Visible() ||922 ((switcher_controller_->Visible() ||
@@ -2852,9 +2853,12 @@
2852 const CompRegion& region,2853 const CompRegion& region,
2853 unsigned int mask)2854 unsigned int mask)
2854{2855{
2855 if (uScreen->doShellRepaint && !uScreen->paint_panel_under_dash_ && window->type() == CompWindowTypeNormalMask)2856 auto window_state = window->state();
2857 auto window_type = window->type();
2858
2859 if (uScreen->doShellRepaint && !uScreen->paint_panel_under_dash_ && window_type == CompWindowTypeNormalMask)
2856 {2860 {
2857 if ((window->state() & MAXIMIZE_STATE) && window->onCurrentDesktop() && !window->overrideRedirect() && window->managed())2861 if ((window_state & MAXIMIZE_STATE) && window->onCurrentDesktop() && !window->overrideRedirect() && window->managed())
2858 {2862 {
2859 CompPoint const& viewport = window->defaultViewport();2863 CompPoint const& viewport = window->defaultViewport();
2860 unsigned output = window->outputDevice();2864 unsigned output = window->outputDevice();
@@ -2887,7 +2891,7 @@
2887 {2891 {
2888 Window active_window = screen->activeWindow();2892 Window active_window = screen->activeWindow();
28892893
2890 if (G_UNLIKELY(window->type() == CompWindowTypeDesktopMask))2894 if (G_UNLIKELY(window_type == CompWindowTypeDesktopMask))
2891 {2895 {
2892 uScreen->setPanelShadowMatrix(matrix);2896 uScreen->setPanelShadowMatrix(matrix);
28932897
@@ -2907,9 +2911,9 @@
2907 draw_panel_shadow = DrawPanelShadow::BELOW_WINDOW;2911 draw_panel_shadow = DrawPanelShadow::BELOW_WINDOW;
2908 uScreen->is_desktop_active_ = false;2912 uScreen->is_desktop_active_ = false;
29092913
2910 if (!(window->state() & CompWindowStateMaximizedVertMask) &&2914 if (!(window_state & CompWindowStateMaximizedVertMask) &&
2911 !(window->state() & CompWindowStateFullscreenMask) &&2915 !(window_state & CompWindowStateFullscreenMask) &&
2912 !(window->type() & CompWindowTypeFullscreenMask))2916 !(window_type & CompWindowTypeFullscreenMask))
2913 {2917 {
2914 WindowManager& wm = WindowManager::Default();2918 WindowManager& wm = WindowManager::Default();
2915 auto const& output = uScreen->screen->currentOutputDev();2919 auto const& output = uScreen->screen->currentOutputDev();
@@ -3817,8 +3821,7 @@
38173821
3818 if (texture->width() && texture->height())3822 if (texture->width() && texture->height())
3819 {3823 {
3820 GLTexture::MatrixList ml(1);3824 GLTexture::MatrixList ml({texture->matrix()});
3821 ml[0] = texture->matrix();
3822 CompRegion texture_region(0, 0, texture->width(), texture->height());3825 CompRegion texture_region(0, 0, texture->width(), texture->height());
3823 gWindow->glAddGeometry(ml, texture_region, texture_region);3826 gWindow->glAddGeometry(ml, texture_region, texture_region);
3824 }3827 }
@@ -3841,16 +3844,13 @@
38413844
3842 using namespace decoration;3845 using namespace decoration;
38433846
3844 // We need to scale the cairo matrix in order to get the properly scaled3847 aspect *= deco_win_->dpi_scale();
3845 cairo_save(ctx);3848 double w = ctx.width() / aspect;
3846 cairo_scale(ctx, aspect, aspect);3849 double h = ctx.height() / aspect;
3847 int w = std::round(ctx.width() / aspect);
3848 int h = std::round(ctx.height() / aspect);
3849 Style::Get()->DrawSide(Side::TOP, WidgetState::NORMAL, ctx, w, h);3850 Style::Get()->DrawSide(Side::TOP, WidgetState::NORMAL, ctx, w, h);
3850 cairo_restore(ctx);
3851}3851}
38523852
3853void UnityWindow::RenderTitle(compiz_utils::CairoContext const& ctx, int x, int y, int width, int height)3853void UnityWindow::RenderTitle(compiz_utils::CairoContext const& ctx, int x, int y, int width, int height, double aspect)
3854{3854{
3855 using namespace decoration;3855 using namespace decoration;
3856 auto const& style = Style::Get();3856 auto const& style = Style::Get();
@@ -3860,6 +3860,7 @@
3860 y += (height - text_size.height)/2;3860 y += (height - text_size.height)/2;
38613861
3862 cairo_save(ctx);3862 cairo_save(ctx);
3863 cairo_scale(ctx, 1.0f/aspect, 1.0f/aspect);
3863 cairo_translate(ctx, x, y);3864 cairo_translate(ctx, x, y);
3864 style->DrawTitle(title, WidgetState::NORMAL, ctx, width - x, height);3865 style->DrawTitle(title, WidgetState::NORMAL, ctx, width - x, height);
3865 cairo_restore(ctx);3866 cairo_restore(ctx);
@@ -3867,14 +3868,12 @@
38673868
3868void UnityWindow::BuildDecorationTexture()3869void UnityWindow::BuildDecorationTexture()
3869{3870{
3870 if (decoration_tex_)
3871 return;
3872
3873 auto const& border = decoration::Style::Get()->Border();3871 auto const& border = decoration::Style::Get()->Border();
38743872
3875 if (border.top)3873 if (border.top)
3876 {3874 {
3877 compiz_utils::CairoContext context(window->borderRect().width(), border.top);3875 double dpi_scale = deco_win_->dpi_scale();
3876 compiz_utils::CairoContext context(window->borderRect().width(), border.top * dpi_scale, dpi_scale);
3878 RenderDecoration(context);3877 RenderDecoration(context);
3879 decoration_tex_ = context;3878 decoration_tex_ = context;
3880 }3879 }
@@ -3896,7 +3895,8 @@
3896 if (!compiz_utils::IsWindowFullyDecorable(window))3895 if (!compiz_utils::IsWindowFullyDecorable(window))
3897 return;3896 return;
38983897
3899 BuildDecorationTexture();3898 if (!decoration_tex_)
3899 BuildDecorationTexture();
39003900
3901 if (decoration_tex_)3901 if (decoration_tex_)
3902 DrawTexture(*decoration_tex_, attrib, transform, mask, geo.x, geo.y, scale);3902 DrawTexture(*decoration_tex_, attrib, transform, mask, geo.x, geo.y, scale);
@@ -3906,8 +3906,9 @@
3906 else3906 else
3907 {3907 {
3908 auto const& style = decoration::Style::Get();3908 auto const& style = decoration::Style::Get();
3909 double dpi_scale = deco_win_->dpi_scale();
3909 int width = geo.width;3910 int width = geo.width;
3910 int height = style->Border().top;3911 int height = style->Border().top * dpi_scale;
3911 auto const& padding = style->Padding(decoration::Side::TOP);3912 auto const& padding = style->Padding(decoration::Side::TOP);
3912 bool redraw_decoration = true;3913 bool redraw_decoration = true;
3913 compiz_utils::SimpleTexture::Ptr close_texture;3914 compiz_utils::SimpleTexture::Ptr close_texture;
@@ -3925,19 +3926,19 @@
3925 if (window->actions() & CompWindowActionCloseMask)3926 if (window->actions() & CompWindowActionCloseMask)
3926 {3927 {
3927 using namespace decoration;3928 using namespace decoration;
3928 close_texture = DataPool::Get()->ButtonTexture(WindowButtonType::CLOSE, close_icon_state_);3929 close_texture = DataPool::Get()->ButtonTexture(dpi_scale, WindowButtonType::CLOSE, close_icon_state_);
3929 }3930 }
39303931
3931 if (redraw_decoration)3932 if (redraw_decoration)
3932 {3933 {
3933 if (width != 0 && height != 0)3934 if (width != 0 && height != 0)
3934 {3935 {
3935 compiz_utils::CairoContext context(width, height);3936 compiz_utils::CairoContext context(width, height, scale * dpi_scale);
3936 RenderDecoration(context, scale);3937 RenderDecoration(context, scale);
39373938
3938 // Draw window title3939 // Draw window title
3939 int text_x = padding.left + (close_texture ? close_texture->width() : 0);3940 int text_x = padding.left + (close_texture ? close_texture->width() : 0) / dpi_scale;
3940 RenderTitle(context, text_x, padding.top, width - padding.right, height);3941 RenderTitle(context, text_x, padding.top, (width - padding.right) / dpi_scale, height / dpi_scale, scale);
3941 decoration_selected_tex_ = context;3942 decoration_selected_tex_ = context;
3942 uScreen->damageRegion(CompRegionFromNuxGeo(geo));3943 uScreen->damageRegion(CompRegionFromNuxGeo(geo));
3943 }3944 }
@@ -3953,10 +3954,12 @@
39533954
3954 if (close_texture)3955 if (close_texture)
3955 {3956 {
3956 int x = geo.x + padding.left;3957 int w = close_texture->width();
3957 int y = geo.y + padding.top + (height - close_texture->height()) / 2.0f;3958 int h = close_texture->height();
3959 int x = geo.x + padding.left * dpi_scale;
3960 int y = geo.y + padding.top * dpi_scale + (height - w) / 2.0f;
39583961
3959 close_button_geo_.Set(x, y, close_texture->width(), close_texture->height());3962 close_button_geo_.Set(x, y, w, h);
3960 DrawTexture(*close_texture, attrib, transform, mask, x, y);3963 DrawTexture(*close_texture, attrib, transform, mask, x, y);
3961 }3964 }
3962 else3965 else
@@ -4041,7 +4044,8 @@
4041{4044{
4042 using namespace decoration;4045 using namespace decoration;
4043 auto const& style = Style::Get();4046 auto const& style = Style::Get();
4044 unsigned glow_size = style->GlowSize();4047 double dpi_scale = deco_win_->dpi_scale();
4048 unsigned glow_size = std::round(style->GlowSize() * dpi_scale);
4045 auto const& glow_texture = DataPool::Get()->GlowTexture();4049 auto const& glow_texture = DataPool::Get()->GlowTexture();
40464050
4047 if (!glow_size || !glow_texture)4051 if (!glow_size || !glow_texture)
@@ -4054,7 +4058,7 @@
4054 {4058 {
4055 // We paint the glow below the window edges to correctly4059 // We paint the glow below the window edges to correctly
4056 // render the rounded corners4060 // render the rounded corners
4057 int inside_glow = decoration_radius / 4;4061 int inside_glow = decoration_radius * dpi_scale / 4;
4058 glow_size += inside_glow;4062 glow_size += inside_glow;
4059 glow_geo.Expand(-inside_glow, -inside_glow);4063 glow_geo.Expand(-inside_glow, -inside_glow);
4060 }4064 }
40614065
=== modified file 'plugins/unityshell/src/unityshell.h'
--- plugins/unityshell/src/unityshell.h 2014-02-18 21:21:16 +0000
+++ plugins/unityshell/src/unityshell.h 2014-03-03 11:01:22 +0000
@@ -519,7 +519,7 @@
519 compiz::WindowInputRemoverLock::Ptr GetInputRemover ();519 compiz::WindowInputRemoverLock::Ptr GetInputRemover ();
520520
521 void RenderDecoration(compiz_utils::CairoContext const&, double aspect = 1.0f);521 void RenderDecoration(compiz_utils::CairoContext const&, double aspect = 1.0f);
522 void RenderTitle(compiz_utils::CairoContext const&, int x, int y, int width, int height);522 void RenderTitle(compiz_utils::CairoContext const&, int x, int y, int width, int height, double aspect = 1.0f);
523 void DrawTexture(GLTexture::List const& textures, GLWindowPaintAttrib const&,523 void DrawTexture(GLTexture::List const& textures, GLWindowPaintAttrib const&,
524 GLMatrix const&, unsigned mask, int x, int y, double aspect = 1.0f);524 GLMatrix const&, unsigned mask, int x, int y, double aspect = 1.0f);
525525
526526
=== removed file 'resources/close_dash.png'
527Binary files resources/close_dash.png 2012-03-14 06:24:18 +0000 and resources/close_dash.png 1970-01-01 00:00:00 +0000 differ527Binary files resources/close_dash.png 2012-03-14 06:24:18 +0000 and resources/close_dash.png 1970-01-01 00:00:00 +0000 differ
=== added file 'resources/close_dash.svg'
--- resources/close_dash.svg 1970-01-01 00:00:00 +0000
+++ resources/close_dash.svg 2014-03-03 11:01:22 +0000
@@ -0,0 +1,74 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="19"
13 height="19"
14 id="svg4486"
15 version="1.1"
16 inkscape:version="0.48+devel r"
17 viewBox="0 0 19 19"
18 sodipodi:docname="close_dash.svg">
19 <defs
20 id="defs4488" />
21 <sodipodi:namedview
22 id="base"
23 pagecolor="#ffffff"
24 bordercolor="#666666"
25 borderopacity="1.0"
26 inkscape:pageopacity="0.0"
27 inkscape:pageshadow="2"
28 inkscape:zoom="0.35"
29 inkscape:cx="9.5000027"
30 inkscape:cy="9.5000031"
31 inkscape:document-units="px"
32 inkscape:current-layer="layer1"
33 showgrid="false"
34 fit-margin-top="0"
35 fit-margin-left="0"
36 fit-margin-right="0"
37 fit-margin-bottom="0" />
38 <metadata
39 id="metadata4491">
40 <rdf:RDF>
41 <cc:Work
42 rdf:about="">
43 <dc:format>image/svg+xml</dc:format>
44 <dc:type
45 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
46 <dc:title></dc:title>
47 </cc:Work>
48 </rdf:RDF>
49 </metadata>
50 <g
51 inkscape:label="Layer 1"
52 inkscape:groupmode="layer"
53 id="layer1"
54 transform="translate(290.21429,-522.86219)">
55 <g
56 transform="translate(-289.7143,-511.00011)"
57 style="display:inline"
58 id="g4113">
59 <path
60 id="circle4507"
61 transform="translate(-76.500002,938.36224)"
62 d="M 85.5,97.5 A 7.4999798,7.4999798 0 0 0 78,105 7.4999798,7.4999798 0 0 0 85.5,112.5 7.4999798,7.4999798 0 0 0 93,105 7.4999798,7.4999798 0 0 0 85.5,97.5 Z m -2.5,4.22266 0.388672,0.38867 L 85.5,104.22266 87.611328,102.11133 88,101.72266 88.777344,102.5 88.388672,102.89062 86.277344,105 88.388672,107.11133 88.777344,107.5 88,108.2793 87.611328,107.89062 85.5,105.7793 83.388672,107.89062 83,108.2793 82.222656,107.5 82.611328,107.11133 84.722656,105 82.611328,102.89062 82.222656,102.5 83,101.72266 Z"
63 style="color:#000000;fill:#dd4814;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
64 inkscape:connector-curvature="0" />
65 <rect
66 y="1033.8623"
67 x="-0.5000006"
68 height="19"
69 width="19"
70 id="rect4539"
71 style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
72 </g>
73 </g>
74</svg>
075
=== removed file 'resources/close_dash_disabled.png'
1Binary files resources/close_dash_disabled.png 2012-02-12 15:48:12 +0000 and resources/close_dash_disabled.png 1970-01-01 00:00:00 +0000 differ76Binary files resources/close_dash_disabled.png 2012-02-12 15:48:12 +0000 and resources/close_dash_disabled.png 1970-01-01 00:00:00 +0000 differ
=== added file 'resources/close_dash_disabled.svg'
--- resources/close_dash_disabled.svg 1970-01-01 00:00:00 +0000
+++ resources/close_dash_disabled.svg 2014-03-03 11:01:22 +0000
@@ -0,0 +1,74 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="19"
13 height="19"
14 id="svg4486"
15 version="1.1"
16 inkscape:version="0.48+devel r"
17 viewBox="0 0 19 19"
18 sodipodi:docname="close_dash_disabled.svg">
19 <defs
20 id="defs4488" />
21 <sodipodi:namedview
22 id="base"
23 pagecolor="#ffffff"
24 bordercolor="#666666"
25 borderopacity="1.0"
26 inkscape:pageopacity="0.0"
27 inkscape:pageshadow="2"
28 inkscape:zoom="7.9580786"
29 inkscape:cx="-7.3730107"
30 inkscape:cy="9.9678584"
31 inkscape:document-units="px"
32 inkscape:current-layer="layer1"
33 showgrid="false"
34 fit-margin-top="0"
35 fit-margin-left="0"
36 fit-margin-right="0"
37 fit-margin-bottom="0" />
38 <metadata
39 id="metadata4491">
40 <rdf:RDF>
41 <cc:Work
42 rdf:about="">
43 <dc:format>image/svg+xml</dc:format>
44 <dc:type
45 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
46 <dc:title></dc:title>
47 </cc:Work>
48 </rdf:RDF>
49 </metadata>
50 <g
51 inkscape:label="Layer 1"
52 inkscape:groupmode="layer"
53 id="layer1"
54 transform="translate(290.21429,-522.86219)">
55 <g
56 style="display:inline"
57 id="g4117"
58 transform="translate(-289.71429,-511.00011)">
59 <path
60 style="color:#000000;fill:#dd4814;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
61 d="M 85.5,97.5 A 7.4999798,7.4999798 0 0 0 78,105 7.4999798,7.4999798 0 0 0 85.5,112.5 7.4999798,7.4999798 0 0 0 93,105 7.4999798,7.4999798 0 0 0 85.5,97.5 Z m -2.5,4.22266 0.388672,0.38867 L 85.5,104.22266 87.611328,102.11133 88,101.72266 88.777344,102.5 88.388672,102.89062 86.277344,105 88.388672,107.11133 88.777344,107.5 88,108.2793 87.611328,107.89062 85.5,105.7793 83.388672,107.89062 83,108.2793 82.222656,107.5 82.611328,107.11133 84.722656,105 82.611328,102.89062 82.222656,102.5 83,101.72266 Z"
62 transform="translate(-76.500002,938.36224)"
63 id="path4119"
64 inkscape:connector-curvature="0" />
65 <rect
66 style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
67 id="rect4121"
68 width="19"
69 height="19"
70 x="-0.5000006"
71 y="1033.8623" />
72 </g>
73 </g>
74</svg>
075
=== removed file 'resources/close_dash_prelight.png'
1Binary files resources/close_dash_prelight.png 2012-03-14 06:24:18 +0000 and resources/close_dash_prelight.png 1970-01-01 00:00:00 +0000 differ76Binary files resources/close_dash_prelight.png 2012-03-14 06:24:18 +0000 and resources/close_dash_prelight.png 1970-01-01 00:00:00 +0000 differ
=== added file 'resources/close_dash_prelight.svg'
--- resources/close_dash_prelight.svg 1970-01-01 00:00:00 +0000
+++ resources/close_dash_prelight.svg 2014-03-03 11:01:22 +0000
@@ -0,0 +1,94 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="19"
13 height="19"
14 id="svg4486"
15 version="1.1"
16 inkscape:version="0.48+devel r"
17 viewBox="0 0 19 19"
18 sodipodi:docname="close_dash_prelight.svg">
19 <defs
20 id="defs4488">
21 <filter
22 inkscape:collect="always"
23 style="color-interpolation-filters:sRGB"
24 id="filter4195"
25 x="-0.12"
26 width="1.24"
27 y="-0.12"
28 height="1.24">
29 <feGaussianBlur
30 inkscape:collect="always"
31 stdDeviation="0.75"
32 id="feGaussianBlur4197" />
33 </filter>
34 </defs>
35 <sodipodi:namedview
36 id="base"
37 pagecolor="#ffffff"
38 bordercolor="#666666"
39 borderopacity="1.0"
40 inkscape:pageopacity="0.0"
41 inkscape:pageshadow="2"
42 inkscape:zoom="7.9580786"
43 inkscape:cx="-7.3730107"
44 inkscape:cy="9.9678584"
45 inkscape:document-units="px"
46 inkscape:current-layer="layer1"
47 showgrid="false"
48 fit-margin-top="0"
49 fit-margin-left="0"
50 fit-margin-right="0"
51 fit-margin-bottom="0" />
52 <metadata
53 id="metadata4491">
54 <rdf:RDF>
55 <cc:Work
56 rdf:about="">
57 <dc:format>image/svg+xml</dc:format>
58 <dc:type
59 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
60 <dc:title></dc:title>
61 </cc:Work>
62 </rdf:RDF>
63 </metadata>
64 <g
65 inkscape:label="Layer 1"
66 inkscape:groupmode="layer"
67 id="layer1"
68 transform="translate(290.21429,-522.86219)">
69 <g
70 style="display:inline"
71 id="g4131"
72 transform="translate(-289.71429,-511.00011)">
73 <path
74 style="color:#000000;fill:#dd4814;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
75 d="M 85.5,97.5 A 7.4999798,7.4999798 0 0 0 78,105 7.4999798,7.4999798 0 0 0 85.5,112.5 7.4999798,7.4999798 0 0 0 93,105 7.4999798,7.4999798 0 0 0 85.5,97.5 Z m -2.5,4.22266 0.388672,0.38867 L 85.5,104.22266 87.611328,102.11133 88,101.72266 88.777344,102.5 88.388672,102.89062 86.277344,105 88.388672,107.11133 88.777344,107.5 88,108.2793 87.611328,107.89062 85.5,105.7793 83.388672,107.89062 83,108.2793 82.222656,107.5 82.611328,107.11133 84.722656,105 82.611328,102.89062 82.222656,102.5 83,101.72266 Z"
76 transform="translate(-76.500002,938.36224)"
77 id="path4133"
78 inkscape:connector-curvature="0" />
79 <rect
80 style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
81 id="rect4135"
82 width="19"
83 height="19"
84 x="-0.5000006"
85 y="1033.8623" />
86 <path
87 inkscape:connector-curvature="0"
88 id="path4137"
89 transform="translate(-76.500002,938.36224)"
90 d="M 85.5,97.5 A 7.4999798,7.4999798 0 0 0 78,105 7.4999798,7.4999798 0 0 0 85.5,112.5 7.4999798,7.4999798 0 0 0 93,105 7.4999798,7.4999798 0 0 0 85.5,97.5 Z m -2.5,4.22266 0.388672,0.38867 L 85.5,104.22266 87.611328,102.11133 88,101.72266 88.777344,102.5 88.388672,102.89062 86.277344,105 88.388672,107.11133 88.777344,107.5 88,108.2793 87.611328,107.89062 85.5,105.7793 83.388672,107.89062 83,108.2793 82.222656,107.5 82.611328,107.11133 84.722656,105 82.611328,102.89062 82.222656,102.5 83,101.72266 Z"
91 style="color:#000000;fill:#dd4814;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter4195);enable-background:accumulate" />
92 </g>
93 </g>
94</svg>
095
=== removed file 'resources/close_dash_pressed.png'
1Binary files resources/close_dash_pressed.png 2012-03-14 06:24:18 +0000 and resources/close_dash_pressed.png 1970-01-01 00:00:00 +0000 differ96Binary files resources/close_dash_pressed.png 2012-03-14 06:24:18 +0000 and resources/close_dash_pressed.png 1970-01-01 00:00:00 +0000 differ
=== added file 'resources/close_dash_pressed.svg'
--- resources/close_dash_pressed.svg 1970-01-01 00:00:00 +0000
+++ resources/close_dash_pressed.svg 2014-03-03 11:01:22 +0000
@@ -0,0 +1,74 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="19"
13 height="19"
14 id="svg4486"
15 version="1.1"
16 inkscape:version="0.48+devel r"
17 viewBox="0 0 19 19"
18 sodipodi:docname="close_dash_pressed.svg">
19 <defs
20 id="defs4488" />
21 <sodipodi:namedview
22 id="base"
23 pagecolor="#ffffff"
24 bordercolor="#666666"
25 borderopacity="1.0"
26 inkscape:pageopacity="0.0"
27 inkscape:pageshadow="2"
28 inkscape:zoom="7.9580786"
29 inkscape:cx="-7.3730107"
30 inkscape:cy="9.9678584"
31 inkscape:document-units="px"
32 inkscape:current-layer="layer1"
33 showgrid="false"
34 fit-margin-top="0"
35 fit-margin-left="0"
36 fit-margin-right="0"
37 fit-margin-bottom="0" />
38 <metadata
39 id="metadata4491">
40 <rdf:RDF>
41 <cc:Work
42 rdf:about="">
43 <dc:format>image/svg+xml</dc:format>
44 <dc:type
45 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
46 <dc:title></dc:title>
47 </cc:Work>
48 </rdf:RDF>
49 </metadata>
50 <g
51 inkscape:label="Layer 1"
52 inkscape:groupmode="layer"
53 id="layer1"
54 transform="translate(290.21429,-522.86219)">
55 <g
56 transform="translate(-289.71429,-511.00011)"
57 id="g4123"
58 style="opacity:0.6;display:inline">
59 <path
60 inkscape:connector-curvature="0"
61 id="path4125"
62 transform="translate(-76.500002,938.36224)"
63 d="M 85.5,97.5 A 7.4999798,7.4999798 0 0 0 78,105 7.4999798,7.4999798 0 0 0 85.5,112.5 7.4999798,7.4999798 0 0 0 93,105 7.4999798,7.4999798 0 0 0 85.5,97.5 Z m -2.5,4.22266 0.388672,0.38867 L 85.5,104.22266 87.611328,102.11133 88,101.72266 88.777344,102.5 88.388672,102.89062 86.277344,105 88.388672,107.11133 88.777344,107.5 88,108.2793 87.611328,107.89062 85.5,105.7793 83.388672,107.89062 83,108.2793 82.222656,107.5 82.611328,107.11133 84.722656,105 82.611328,102.89062 82.222656,102.5 83,101.72266 Z"
64 style="color:#000000;fill:#dd4814;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
65 <rect
66 y="1033.8623"
67 x="-0.5000006"
68 height="19"
69 width="19"
70 id="rect4127"
71 style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
72 </g>
73 </g>
74</svg>
075
=== removed file 'resources/maximize_dash.png'
1Binary files resources/maximize_dash.png 2012-03-14 06:24:18 +0000 and resources/maximize_dash.png 1970-01-01 00:00:00 +0000 differ76Binary files resources/maximize_dash.png 2012-03-14 06:24:18 +0000 and resources/maximize_dash.png 1970-01-01 00:00:00 +0000 differ
=== added file 'resources/maximize_dash.svg'
--- resources/maximize_dash.svg 1970-01-01 00:00:00 +0000
+++ resources/maximize_dash.svg 2014-03-03 11:01:22 +0000
@@ -0,0 +1,73 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="19"
13 height="19"
14 id="svg4486"
15 version="1.1"
16 inkscape:version="0.48+devel r"
17 viewBox="0 0 19 19"
18 sodipodi:docname="maximize_dash.svg">
19 <defs
20 id="defs4488" />
21 <sodipodi:namedview
22 id="base"
23 pagecolor="#ffffff"
24 bordercolor="#666666"
25 borderopacity="1.0"
26 inkscape:pageopacity="0.0"
27 inkscape:pageshadow="2"
28 inkscape:zoom="7.9580786"
29 inkscape:cx="-7.3730107"
30 inkscape:cy="9.9678584"
31 inkscape:document-units="px"
32 inkscape:current-layer="layer1"
33 showgrid="false"
34 fit-margin-top="0"
35 fit-margin-left="0"
36 fit-margin-right="0"
37 fit-margin-bottom="0" />
38 <metadata
39 id="metadata4491">
40 <rdf:RDF>
41 <cc:Work
42 rdf:about="">
43 <dc:format>image/svg+xml</dc:format>
44 <dc:type
45 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
46 <dc:title></dc:title>
47 </cc:Work>
48 </rdf:RDF>
49 </metadata>
50 <g
51 inkscape:label="Layer 1"
52 inkscape:groupmode="layer"
53 id="layer1"
54 transform="translate(290.21429,-522.86219)">
55 <g
56 transform="translate(-289.71429,-492.00011)"
57 style="display:inline"
58 id="g4218">
59 <path
60 inkscape:connector-curvature="0"
61 id="path4209"
62 d="m 8.999998,1016.8622 a 7.4999796,7.4999796 0 0 0 -7.5,7.5 7.4999796,7.4999796 0 0 0 7.5,7.5 7.4999796,7.4999796 0 0 0 7.5,-7.5 7.4999796,7.4999796 0 0 0 -7.5,-7.5 z m -3.5,4 7,0 0,7 -7,0 0,-6.5 0,-0.5 z m 1,1 0,5 5,0 0,-5 -5,0 z"
63 style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
64 <rect
65 style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
66 id="rect4203"
67 width="19"
68 height="19"
69 x="-0.5000006"
70 y="1014.8623" />
71 </g>
72 </g>
73</svg>
074
=== removed file 'resources/maximize_dash_disabled.png'
1Binary files resources/maximize_dash_disabled.png 2012-02-12 15:48:12 +0000 and resources/maximize_dash_disabled.png 1970-01-01 00:00:00 +0000 differ75Binary files resources/maximize_dash_disabled.png 2012-02-12 15:48:12 +0000 and resources/maximize_dash_disabled.png 1970-01-01 00:00:00 +0000 differ
=== added file 'resources/maximize_dash_disabled.svg'
--- resources/maximize_dash_disabled.svg 1970-01-01 00:00:00 +0000
+++ resources/maximize_dash_disabled.svg 2014-03-03 11:01:22 +0000
@@ -0,0 +1,73 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="19"
13 height="19"
14 id="svg4486"
15 version="1.1"
16 inkscape:version="0.48+devel r"
17 viewBox="0 0 19 19"
18 sodipodi:docname="maximize_dash_disabled.svg">
19 <defs
20 id="defs4488" />
21 <sodipodi:namedview
22 id="base"
23 pagecolor="#ffffff"
24 bordercolor="#666666"
25 borderopacity="1.0"
26 inkscape:pageopacity="0.0"
27 inkscape:pageshadow="2"
28 inkscape:zoom="7.9580786"
29 inkscape:cx="-7.3730107"
30 inkscape:cy="9.9678584"
31 inkscape:document-units="px"
32 inkscape:current-layer="layer1"
33 showgrid="false"
34 fit-margin-top="0"
35 fit-margin-left="0"
36 fit-margin-right="0"
37 fit-margin-bottom="0" />
38 <metadata
39 id="metadata4491">
40 <rdf:RDF>
41 <cc:Work
42 rdf:about="">
43 <dc:format>image/svg+xml</dc:format>
44 <dc:type
45 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
46 <dc:title></dc:title>
47 </cc:Work>
48 </rdf:RDF>
49 </metadata>
50 <g
51 inkscape:label="Layer 1"
52 inkscape:groupmode="layer"
53 id="layer1"
54 transform="translate(290.21429,-522.86219)">
55 <g
56 style="opacity:0.25;display:inline"
57 transform="translate(-289.71429,-492.00011)"
58 id="g4240">
59 <path
60 inkscape:connector-curvature="0"
61 id="path4242"
62 d="m 8.999998,1016.8622 a 7.4999796,7.4999796 0 0 0 -7.5,7.5 7.4999796,7.4999796 0 0 0 7.5,7.5 7.4999796,7.4999796 0 0 0 7.5,-7.5 7.4999796,7.4999796 0 0 0 -7.5,-7.5 z m -3.5,4 7,0 0,7 -7,0 0,-6.5 0,-0.5 z m 1,1 0,5 5,0 0,-5 -5,0 z"
63 style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
64 <rect
65 style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
66 id="rect4244"
67 width="19"
68 height="19"
69 x="-0.5000006"
70 y="1014.8623" />
71 </g>
72 </g>
73</svg>
074
=== removed file 'resources/maximize_dash_prelight.png'
1Binary files resources/maximize_dash_prelight.png 2012-03-14 06:24:18 +0000 and resources/maximize_dash_prelight.png 1970-01-01 00:00:00 +0000 differ75Binary files resources/maximize_dash_prelight.png 2012-03-14 06:24:18 +0000 and resources/maximize_dash_prelight.png 1970-01-01 00:00:00 +0000 differ
=== added file 'resources/maximize_dash_prelight.svg'
--- resources/maximize_dash_prelight.svg 1970-01-01 00:00:00 +0000
+++ resources/maximize_dash_prelight.svg 2014-03-03 11:01:22 +0000
@@ -0,0 +1,92 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="19"
13 height="19"
14 id="svg4486"
15 version="1.1"
16 inkscape:version="0.48+devel r"
17 viewBox="0 0 19 19"
18 sodipodi:docname="maximize_dash_prelight.svg">
19 <defs
20 id="defs4488">
21 <filter
22 inkscape:collect="always"
23 style="color-interpolation-filters:sRGB"
24 id="filter4230"
25 x="-0.12"
26 width="1.24"
27 y="-0.12"
28 height="1.24">
29 <feGaussianBlur
30 inkscape:collect="always"
31 stdDeviation="0.75"
32 id="feGaussianBlur4232" />
33 </filter>
34 </defs>
35 <sodipodi:namedview
36 id="base"
37 pagecolor="#ffffff"
38 bordercolor="#666666"
39 borderopacity="1.0"
40 inkscape:pageopacity="0.0"
41 inkscape:pageshadow="2"
42 inkscape:zoom="7.9580786"
43 inkscape:cx="-7.3730107"
44 inkscape:cy="9.9678584"
45 inkscape:document-units="px"
46 inkscape:current-layer="layer1"
47 showgrid="false"
48 fit-margin-top="0"
49 fit-margin-left="0"
50 fit-margin-right="0"
51 fit-margin-bottom="0" />
52 <metadata
53 id="metadata4491">
54 <rdf:RDF>
55 <cc:Work
56 rdf:about="">
57 <dc:format>image/svg+xml</dc:format>
58 <dc:type
59 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
60 <dc:title></dc:title>
61 </cc:Work>
62 </rdf:RDF>
63 </metadata>
64 <g
65 inkscape:label="Layer 1"
66 inkscape:groupmode="layer"
67 id="layer1"
68 transform="translate(290.21429,-522.86219)">
69 <g
70 style="display:inline"
71 id="g4222"
72 transform="translate(-289.71429,-492.00011)">
73 <path
74 style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
75 d="m 8.999998,1016.8622 a 7.4999796,7.4999796 0 0 0 -7.5,7.5 7.4999796,7.4999796 0 0 0 7.5,7.5 7.4999796,7.4999796 0 0 0 7.5,-7.5 7.4999796,7.4999796 0 0 0 -7.5,-7.5 z m -3.5,4 7,0 0,7 -7,0 0,-6.5 0,-0.5 z m 1,1 0,5 5,0 0,-5 -5,0 z"
76 id="path4224"
77 inkscape:connector-curvature="0" />
78 <rect
79 y="1014.8623"
80 x="-0.5000006"
81 height="19"
82 width="19"
83 id="rect4226"
84 style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
85 <path
86 inkscape:connector-curvature="0"
87 id="path4228"
88 d="m 8.999998,1016.8622 a 7.4999796,7.4999796 0 0 0 -7.5,7.5 7.4999796,7.4999796 0 0 0 7.5,7.5 7.4999796,7.4999796 0 0 0 7.5,-7.5 7.4999796,7.4999796 0 0 0 -7.5,-7.5 z m -3.5,4 7,0 0,7 -7,0 0,-6.5 0,-0.5 z m 1,1 0,5 5,0 0,-5 -5,0 z"
89 style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter4230);enable-background:accumulate" />
90 </g>
91 </g>
92</svg>
093
=== removed file 'resources/maximize_dash_pressed.png'
1Binary files resources/maximize_dash_pressed.png 2012-03-14 06:24:18 +0000 and resources/maximize_dash_pressed.png 1970-01-01 00:00:00 +0000 differ94Binary files resources/maximize_dash_pressed.png 2012-03-14 06:24:18 +0000 and resources/maximize_dash_pressed.png 1970-01-01 00:00:00 +0000 differ
=== added file 'resources/maximize_dash_pressed.svg'
--- resources/maximize_dash_pressed.svg 1970-01-01 00:00:00 +0000
+++ resources/maximize_dash_pressed.svg 2014-03-03 11:01:22 +0000
@@ -0,0 +1,73 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="19"
13 height="19"
14 id="svg4486"
15 version="1.1"
16 inkscape:version="0.48+devel r"
17 viewBox="0 0 19 19"
18 sodipodi:docname="maximize_dash_pressed.svg">
19 <defs
20 id="defs4488" />
21 <sodipodi:namedview
22 id="base"
23 pagecolor="#ffffff"
24 bordercolor="#666666"
25 borderopacity="1.0"
26 inkscape:pageopacity="0.0"
27 inkscape:pageshadow="2"
28 inkscape:zoom="7.9580786"
29 inkscape:cx="-7.3730107"
30 inkscape:cy="9.9678584"
31 inkscape:document-units="px"
32 inkscape:current-layer="layer1"
33 showgrid="false"
34 fit-margin-top="0"
35 fit-margin-left="0"
36 fit-margin-right="0"
37 fit-margin-bottom="0" />
38 <metadata
39 id="metadata4491">
40 <rdf:RDF>
41 <cc:Work
42 rdf:about="">
43 <dc:format>image/svg+xml</dc:format>
44 <dc:type
45 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
46 <dc:title></dc:title>
47 </cc:Work>
48 </rdf:RDF>
49 </metadata>
50 <g
51 inkscape:label="Layer 1"
52 inkscape:groupmode="layer"
53 id="layer1"
54 transform="translate(290.21429,-522.86219)">
55 <g
56 id="g4234"
57 transform="translate(-289.71429,-492.00011)"
58 style="opacity:0.5;display:inline">
59 <path
60 style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
61 d="m 8.999998,1016.8622 a 7.4999796,7.4999796 0 0 0 -7.5,7.5 7.4999796,7.4999796 0 0 0 7.5,7.5 7.4999796,7.4999796 0 0 0 7.5,-7.5 7.4999796,7.4999796 0 0 0 -7.5,-7.5 z m -3.5,4 7,0 0,7 -7,0 0,-6.5 0,-0.5 z m 1,1 0,5 5,0 0,-5 -5,0 z"
62 id="path4236"
63 inkscape:connector-curvature="0" />
64 <rect
65 y="1014.8623"
66 x="-0.5000006"
67 height="19"
68 width="19"
69 id="rect4238"
70 style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
71 </g>
72 </g>
73</svg>
074
=== removed file 'resources/minimize_dash.png'
1Binary files resources/minimize_dash.png 2012-03-14 06:24:18 +0000 and resources/minimize_dash.png 1970-01-01 00:00:00 +0000 differ75Binary files resources/minimize_dash.png 2012-03-14 06:24:18 +0000 and resources/minimize_dash.png 1970-01-01 00:00:00 +0000 differ
=== added file 'resources/minimize_dash.svg'
--- resources/minimize_dash.svg 1970-01-01 00:00:00 +0000
+++ resources/minimize_dash.svg 2014-03-03 11:01:22 +0000
@@ -0,0 +1,74 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="19"
13 height="19"
14 id="svg4486"
15 version="1.1"
16 inkscape:version="0.48+devel r"
17 viewBox="0 0 19 19"
18 sodipodi:docname="minimize_dash.svg">
19 <defs
20 id="defs4488" />
21 <sodipodi:namedview
22 id="base"
23 pagecolor="#ffffff"
24 bordercolor="#666666"
25 borderopacity="1.0"
26 inkscape:pageopacity="0.0"
27 inkscape:pageshadow="2"
28 inkscape:zoom="7.9580786"
29 inkscape:cx="-7.3730107"
30 inkscape:cy="9.9678584"
31 inkscape:document-units="px"
32 inkscape:current-layer="layer1"
33 showgrid="false"
34 fit-margin-top="0"
35 fit-margin-left="0"
36 fit-margin-right="0"
37 fit-margin-bottom="0" />
38 <metadata
39 id="metadata4491">
40 <rdf:RDF>
41 <cc:Work
42 rdf:about="">
43 <dc:format>image/svg+xml</dc:format>
44 <dc:type
45 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
46 <dc:title></dc:title>
47 </cc:Work>
48 </rdf:RDF>
49 </metadata>
50 <g
51 inkscape:label="Layer 1"
52 inkscape:groupmode="layer"
53 id="layer1"
54 transform="translate(290.21429,-522.86219)">
55 <g
56 transform="translate(-289.71429,-473.00011)"
57 id="g4261"
58 style="opacity:0.5;display:inline">
59 <path
60 id="path4256"
61 transform="translate(-76.500002,938.36224)"
62 d="M 85.5,59.5 A 7.4999794,7.4999794 0 0 0 78,67 7.4999794,7.4999794 0 0 0 85.5,74.5 7.4999794,7.4999794 0 0 0 93,67 7.4999794,7.4999794 0 0 0 85.5,59.5 Z m -3.5,7 7,0 0,1 -7,0 0,-1 z"
63 style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
64 inkscape:connector-curvature="0" />
65 <rect
66 y="995.8623"
67 x="-0.5000006"
68 height="19"
69 width="19"
70 id="rect4250"
71 style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
72 </g>
73 </g>
74</svg>
075
=== removed file 'resources/minimize_dash_disabled.png'
1Binary files resources/minimize_dash_disabled.png 2012-02-12 15:48:12 +0000 and resources/minimize_dash_disabled.png 1970-01-01 00:00:00 +0000 differ76Binary files resources/minimize_dash_disabled.png 2012-02-12 15:48:12 +0000 and resources/minimize_dash_disabled.png 1970-01-01 00:00:00 +0000 differ
=== added file 'resources/minimize_dash_disabled.svg'
--- resources/minimize_dash_disabled.svg 1970-01-01 00:00:00 +0000
+++ resources/minimize_dash_disabled.svg 2014-03-03 11:01:22 +0000
@@ -0,0 +1,74 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="19"
13 height="19"
14 id="svg4486"
15 version="1.1"
16 inkscape:version="0.48+devel r"
17 viewBox="0 0 19 19"
18 sodipodi:docname="minimize_dash_disabled.svg">
19 <defs
20 id="defs4488" />
21 <sodipodi:namedview
22 id="base"
23 pagecolor="#ffffff"
24 bordercolor="#666666"
25 borderopacity="1.0"
26 inkscape:pageopacity="0.0"
27 inkscape:pageshadow="2"
28 inkscape:zoom="7.9580786"
29 inkscape:cx="-7.3730107"
30 inkscape:cy="9.9678584"
31 inkscape:document-units="px"
32 inkscape:current-layer="layer1"
33 showgrid="false"
34 fit-margin-top="0"
35 fit-margin-left="0"
36 fit-margin-right="0"
37 fit-margin-bottom="0" />
38 <metadata
39 id="metadata4491">
40 <rdf:RDF>
41 <cc:Work
42 rdf:about="">
43 <dc:format>image/svg+xml</dc:format>
44 <dc:type
45 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
46 <dc:title></dc:title>
47 </cc:Work>
48 </rdf:RDF>
49 </metadata>
50 <g
51 inkscape:label="Layer 1"
52 inkscape:groupmode="layer"
53 id="layer1"
54 transform="translate(290.21429,-522.86219)">
55 <g
56 transform="translate(-289.71429,-473.00011)"
57 id="g4261"
58 style="opacity:0.25;display:inline">
59 <path
60 id="path4256"
61 transform="translate(-76.500002,938.36224)"
62 d="M 85.5,59.5 A 7.4999794,7.4999794 0 0 0 78,67 7.4999794,7.4999794 0 0 0 85.5,74.5 7.4999794,7.4999794 0 0 0 93,67 7.4999794,7.4999794 0 0 0 85.5,59.5 Z m -3.5,7 7,0 0,1 -7,0 0,-1 z"
63 style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
64 inkscape:connector-curvature="0" />
65 <rect
66 y="995.8623"
67 x="-0.5000006"
68 height="19"
69 width="19"
70 id="rect4250"
71 style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
72 </g>
73 </g>
74</svg>
075
=== removed file 'resources/minimize_dash_prelight.png'
1Binary files resources/minimize_dash_prelight.png 2012-03-14 06:24:18 +0000 and resources/minimize_dash_prelight.png 1970-01-01 00:00:00 +0000 differ76Binary files resources/minimize_dash_prelight.png 2012-03-14 06:24:18 +0000 and resources/minimize_dash_prelight.png 1970-01-01 00:00:00 +0000 differ
=== added file 'resources/minimize_dash_prelight.svg'
--- resources/minimize_dash_prelight.svg 1970-01-01 00:00:00 +0000
+++ resources/minimize_dash_prelight.svg 2014-03-03 11:01:22 +0000
@@ -0,0 +1,94 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="19"
13 height="19"
14 id="svg4486"
15 version="1.1"
16 inkscape:version="0.48+devel r"
17 viewBox="0 0 19 19"
18 sodipodi:docname="minimize_dash_prelight.svg">
19 <defs
20 id="defs4488">
21 <filter
22 inkscape:collect="always"
23 style="color-interpolation-filters:sRGB"
24 id="filter4411"
25 x="-0.12"
26 width="1.24"
27 y="-0.12"
28 height="1.24">
29 <feGaussianBlur
30 inkscape:collect="always"
31 stdDeviation="0.75"
32 id="feGaussianBlur4413" />
33 </filter>
34 </defs>
35 <sodipodi:namedview
36 id="base"
37 pagecolor="#ffffff"
38 bordercolor="#666666"
39 borderopacity="1.0"
40 inkscape:pageopacity="0.0"
41 inkscape:pageshadow="2"
42 inkscape:zoom="7.9580786"
43 inkscape:cx="-7.3730107"
44 inkscape:cy="9.9678584"
45 inkscape:document-units="px"
46 inkscape:current-layer="layer1"
47 showgrid="false"
48 fit-margin-top="0"
49 fit-margin-left="0"
50 fit-margin-right="0"
51 fit-margin-bottom="0" />
52 <metadata
53 id="metadata4491">
54 <rdf:RDF>
55 <cc:Work
56 rdf:about="">
57 <dc:format>image/svg+xml</dc:format>
58 <dc:type
59 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
60 <dc:title></dc:title>
61 </cc:Work>
62 </rdf:RDF>
63 </metadata>
64 <g
65 inkscape:label="Layer 1"
66 inkscape:groupmode="layer"
67 id="layer1"
68 transform="translate(290.21429,-522.86219)">
69 <g
70 style="display:inline"
71 id="g4265"
72 transform="translate(-289.71429,-473.00011)">
73 <path
74 style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
75 d="M 85.5,59.5 A 7.4999794,7.4999794 0 0 0 78,67 7.4999794,7.4999794 0 0 0 85.5,74.5 7.4999794,7.4999794 0 0 0 93,67 7.4999794,7.4999794 0 0 0 85.5,59.5 Z m -3.5,7 7,0 0,1 -7,0 0,-1 z"
76 transform="translate(-76.500002,938.36224)"
77 id="path4267"
78 inkscape:connector-curvature="0" />
79 <rect
80 style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
81 id="rect4269"
82 width="19"
83 height="19"
84 x="-0.5000006"
85 y="995.8623" />
86 <path
87 inkscape:connector-curvature="0"
88 id="path4409"
89 transform="translate(-76.500002,938.36224)"
90 d="M 85.5,59.5 A 7.4999794,7.4999794 0 0 0 78,67 7.4999794,7.4999794 0 0 0 85.5,74.5 7.4999794,7.4999794 0 0 0 93,67 7.4999794,7.4999794 0 0 0 85.5,59.5 Z m -3.5,7 7,0 0,1 -7,0 0,-1 z"
91 style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter4411);enable-background:accumulate" />
92 </g>
93 </g>
94</svg>
095
=== removed file 'resources/minimize_dash_pressed.png'
1Binary files resources/minimize_dash_pressed.png 2012-03-14 06:24:18 +0000 and resources/minimize_dash_pressed.png 1970-01-01 00:00:00 +0000 differ96Binary files resources/minimize_dash_pressed.png 2012-03-14 06:24:18 +0000 and resources/minimize_dash_pressed.png 1970-01-01 00:00:00 +0000 differ
=== added file 'resources/minimize_dash_pressed.svg'
--- resources/minimize_dash_pressed.svg 1970-01-01 00:00:00 +0000
+++ resources/minimize_dash_pressed.svg 2014-03-03 11:01:22 +0000
@@ -0,0 +1,74 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="19"
13 height="19"
14 id="svg4486"
15 version="1.1"
16 inkscape:version="0.48+devel r"
17 viewBox="0 0 19 19"
18 sodipodi:docname="minimize_dash_pressed.svg">
19 <defs
20 id="defs4488" />
21 <sodipodi:namedview
22 id="base"
23 pagecolor="#ffffff"
24 bordercolor="#666666"
25 borderopacity="1.0"
26 inkscape:pageopacity="0.0"
27 inkscape:pageshadow="2"
28 inkscape:zoom="7.9580786"
29 inkscape:cx="-7.3730107"
30 inkscape:cy="9.9678584"
31 inkscape:document-units="px"
32 inkscape:current-layer="layer1"
33 showgrid="false"
34 fit-margin-top="0"
35 fit-margin-left="0"
36 fit-margin-right="0"
37 fit-margin-bottom="0" />
38 <metadata
39 id="metadata4491">
40 <rdf:RDF>
41 <cc:Work
42 rdf:about="">
43 <dc:format>image/svg+xml</dc:format>
44 <dc:type
45 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
46 <dc:title></dc:title>
47 </cc:Work>
48 </rdf:RDF>
49 </metadata>
50 <g
51 inkscape:label="Layer 1"
52 inkscape:groupmode="layer"
53 id="layer1"
54 transform="translate(290.21429,-522.86219)">
55 <g
56 transform="translate(-289.71429,-473.00011)"
57 id="g4261"
58 style="opacity:0.5;display:inline">
59 <path
60 id="path4256"
61 transform="translate(-76.500002,938.36224)"
62 d="M 85.5,59.5 A 7.4999794,7.4999794 0 0 0 78,67 7.4999794,7.4999794 0 0 0 85.5,74.5 7.4999794,7.4999794 0 0 0 93,67 7.4999794,7.4999794 0 0 0 85.5,59.5 Z m -3.5,7 7,0 0,1 -7,0 0,-1 z"
63 style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
64 inkscape:connector-curvature="0" />
65 <rect
66 y="995.8623"
67 x="-0.5000006"
68 height="19"
69 width="19"
70 id="rect4250"
71 style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
72 </g>
73 </g>
74</svg>
075
=== removed file 'resources/progress_bar_fill.png'
1Binary files resources/progress_bar_fill.png 2010-12-15 19:21:14 +0000 and resources/progress_bar_fill.png 1970-01-01 00:00:00 +0000 differ76Binary files resources/progress_bar_fill.png 2010-12-15 19:21:14 +0000 and resources/progress_bar_fill.png 1970-01-01 00:00:00 +0000 differ
=== added file 'resources/progress_bar_fill.svg'
--- resources/progress_bar_fill.svg 1970-01-01 00:00:00 +0000
+++ resources/progress_bar_fill.svg 2014-03-03 11:01:22 +0000
@@ -0,0 +1,141 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="42"
13 height="4"
14 id="svg2"
15 version="1.1"
16 inkscape:version="0.48.4 r9939"
17 inkscape:export-filename="/home/marco/Dev/unity/trunk/resources/progress_bar_trough_150.png"
18 inkscape:export-xdpi="250"
19 inkscape:export-ydpi="250"
20 sodipodi:docname="progress_bar_trough.svg">
21 <defs
22 id="defs4">
23 <marker
24 inkscape:stockid="Torso"
25 orient="auto"
26 refY="0"
27 refX="0"
28 id="Torso"
29 style="overflow:visible">
30 <g
31 id="g4192"
32 transform="scale(0.7,0.7)">
33 <path
34 id="path4194"
35 d="m -4.7792281,-3.239542 c 2.350374,0.3659393 5.30026732,1.9375477 5.03715532,3.62748546 C -0.00518779,2.0778819 -2.2126741,2.6176539 -4.5630471,2.2517169 -6.9134221,1.8857769 -8.521035,0.75201414 -8.257922,-0.93792336 -7.994809,-2.6278615 -7.1296041,-3.6054813 -4.7792281,-3.239542 z"
36 style="fill:none;stroke:#000000;stroke-width:1.25"
37 inkscape:connector-curvature="0" />
38 <path
39 id="path4196"
40 d="M 4.4598789,0.08866574 C -2.5564571,-4.378332 5.2248769,-3.9061806 -0.84829578,-8.7197331"
41 style="fill:none;stroke:#000000;stroke-width:1pt"
42 inkscape:connector-curvature="0" />
43 <path
44 id="path4198"
45 d="M 4.9298719,0.05752074 C -1.3872731,1.7494689 1.8027579,5.4782079 -4.9448731,7.5462725"
46 style="fill:none;stroke:#000000;stroke-width:1pt"
47 inkscape:connector-curvature="0" />
48 <rect
49 id="rect4200"
50 transform="matrix(0.527536,-0.849533,0.887668,0.460484,0,0)"
51 y="-1.7408575"
52 x="-10.391706"
53 height="2.7608147"
54 width="2.6366582"
55 style="fill-rule:evenodd;stroke-width:1pt" />
56 <rect
57 id="rect4202"
58 transform="matrix(0.671205,-0.741272,0.790802,0.612072,0,0)"
59 y="-7.9629307"
60 x="4.9587269"
61 height="2.8614161"
62 width="2.7327356"
63 style="fill-rule:evenodd;stroke-width:1pt" />
64 <path
65 id="path4204"
66 transform="matrix(0,-1.109517,1.109517,0,25.96648,19.71619)"
67 d="m 16.779951,-28.685045 a 0.60731727,0.60731727 0 1 0 -1.214634,0 0.60731727,0.60731727 0 1 0 1.214634,0 z"
68 style="fill:#ff0000;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
69 inkscape:connector-curvature="0" />
70 <path
71 id="path4206"
72 transform="matrix(0,-1.109517,1.109517,0,26.8245,16.99126)"
73 d="m 16.779951,-28.685045 a 0.60731727,0.60731727 0 1 0 -1.214634,0 0.60731727,0.60731727 0 1 0 1.214634,0 z"
74 style="fill:#ff0000;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
75 inkscape:connector-curvature="0" />
76 </g>
77 </marker>
78 <marker
79 inkscape:stockid="Arrow1Lstart"
80 orient="auto"
81 refY="0"
82 refX="0"
83 id="Arrow1Lstart"
84 style="overflow:visible">
85 <path
86 id="path3980"
87 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
88 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
89 transform="matrix(0.8,0,0,0.8,10,0)"
90 inkscape:connector-curvature="0" />
91 </marker>
92 </defs>
93 <sodipodi:namedview
94 id="base"
95 pagecolor="#12f82b"
96 bordercolor="#666666"
97 borderopacity="1.0"
98 inkscape:pageopacity="0"
99 inkscape:pageshadow="2"
100 inkscape:zoom="7.9195959"
101 inkscape:cx="47.76404"
102 inkscape:cy="27.178915"
103 inkscape:document-units="px"
104 inkscape:current-layer="layer2"
105 showgrid="false"
106 inkscape:window-width="1450"
107 inkscape:window-height="793"
108 inkscape:window-x="551"
109 inkscape:window-y="125"
110 inkscape:window-maximized="0" />
111 <metadata
112 id="metadata7">
113 <rdf:RDF>
114 <cc:Work
115 rdf:about="">
116 <dc:format>image/svg+xml</dc:format>
117 <dc:type
118 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
119 <dc:title></dc:title>
120 </cc:Work>
121 </rdf:RDF>
122 </metadata>
123 <g
124 inkscape:groupmode="layer"
125 id="layer2"
126 inkscape:label="Livello"
127 style="display:inline"
128 transform="translate(0,-1048.3622)">
129 <rect
130 style="fill:#bdbdbd;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:0;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
131 id="rect5033"
132 width="42"
133 height="4"
134 x="0"
135 y="1048.3622"
136 ry="1.4394673"
137 inkscape:export-filename="/tmp/progress.png"
138 inkscape:export-xdpi="90"
139 inkscape:export-ydpi="90" />
140 </g>
141</svg>
0142
=== removed file 'resources/progress_bar_trough.png'
1Binary files resources/progress_bar_trough.png 2010-12-15 19:21:14 +0000 and resources/progress_bar_trough.png 1970-01-01 00:00:00 +0000 differ143Binary files resources/progress_bar_trough.png 2010-12-15 19:21:14 +0000 and resources/progress_bar_trough.png 1970-01-01 00:00:00 +0000 differ
=== added file 'resources/progress_bar_trough.svg'
--- resources/progress_bar_trough.svg 1970-01-01 00:00:00 +0000
+++ resources/progress_bar_trough.svg 2014-03-03 11:01:22 +0000
@@ -0,0 +1,179 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:xlink="http://www.w3.org/1999/xlink"
11 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13 width="54"
14 height="54"
15 id="svg2"
16 version="1.1"
17 inkscape:version="0.48.4 r9939"
18 inkscape:export-filename="/home/marco/Dev/unity/trunk/resources/progress_bar_trough_150.png"
19 inkscape:export-xdpi="250"
20 inkscape:export-ydpi="250"
21 sodipodi:docname="progress_bar_trough.svg">
22 <defs
23 id="defs4">
24 <marker
25 inkscape:stockid="Torso"
26 orient="auto"
27 refY="0"
28 refX="0"
29 id="Torso"
30 style="overflow:visible">
31 <g
32 id="g4192"
33 transform="scale(0.7,0.7)">
34 <path
35 id="path4194"
36 d="m -4.7792281,-3.239542 c 2.350374,0.3659393 5.30026732,1.9375477 5.03715532,3.62748546 C -0.00518779,2.0778819 -2.2126741,2.6176539 -4.5630471,2.2517169 -6.9134221,1.8857769 -8.521035,0.75201414 -8.257922,-0.93792336 -7.994809,-2.6278615 -7.1296041,-3.6054813 -4.7792281,-3.239542 z"
37 style="fill:none;stroke:#000000;stroke-width:1.25"
38 inkscape:connector-curvature="0" />
39 <path
40 id="path4196"
41 d="M 4.4598789,0.08866574 C -2.5564571,-4.378332 5.2248769,-3.9061806 -0.84829578,-8.7197331"
42 style="fill:none;stroke:#000000;stroke-width:1pt"
43 inkscape:connector-curvature="0" />
44 <path
45 id="path4198"
46 d="M 4.9298719,0.05752074 C -1.3872731,1.7494689 1.8027579,5.4782079 -4.9448731,7.5462725"
47 style="fill:none;stroke:#000000;stroke-width:1pt"
48 inkscape:connector-curvature="0" />
49 <rect
50 id="rect4200"
51 transform="matrix(0.527536,-0.849533,0.887668,0.460484,0,0)"
52 y="-1.7408575"
53 x="-10.391706"
54 height="2.7608147"
55 width="2.6366582"
56 style="fill-rule:evenodd;stroke-width:1pt" />
57 <rect
58 id="rect4202"
59 transform="matrix(0.671205,-0.741272,0.790802,0.612072,0,0)"
60 y="-7.9629307"
61 x="4.9587269"
62 height="2.8614161"
63 width="2.7327356"
64 style="fill-rule:evenodd;stroke-width:1pt" />
65 <path
66 id="path4204"
67 transform="matrix(0,-1.109517,1.109517,0,25.96648,19.71619)"
68 d="m 16.779951,-28.685045 a 0.60731727,0.60731727 0 1 0 -1.214634,0 0.60731727,0.60731727 0 1 0 1.214634,0 z"
69 style="fill:#ff0000;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
70 inkscape:connector-curvature="0" />
71 <path
72 id="path4206"
73 transform="matrix(0,-1.109517,1.109517,0,26.8245,16.99126)"
74 d="m 16.779951,-28.685045 a 0.60731727,0.60731727 0 1 0 -1.214634,0 0.60731727,0.60731727 0 1 0 1.214634,0 z"
75 style="fill:#ff0000;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
76 inkscape:connector-curvature="0" />
77 </g>
78 </marker>
79 <marker
80 inkscape:stockid="Arrow1Lstart"
81 orient="auto"
82 refY="0"
83 refX="0"
84 id="Arrow1Lstart"
85 style="overflow:visible">
86 <path
87 id="path3980"
88 d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
89 style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
90 transform="matrix(0.8,0,0,0.8,10,0)"
91 inkscape:connector-curvature="0" />
92 </marker>
93 <filter
94 inkscape:collect="always"
95 id="filter6680"
The diff has been truncated for viewing.