Merge lp:~3v1n0/unity/hidpi-better-scaling into lp:unity
- hidpi-better-scaling
- Merge into trunk
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 | ||||||||||||||||||||||||||||
Related bugs: |
|
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_
Description of the change
Lots of fixes around... Things should scale properly now.
PS Jenkins bot (ps-jenkins) wrote : | # |
Brandon Schaefer (brandontschaefer) wrote : | # |
We should just use RawPixels in:
992 === modified file 'launcher/
That way we can each hard coded pixel to the correct Converter vs <number> * scale.
1659 + SetMinMaxSize(
Same here, as there is a valid cv_ here, we could jsut do width.CP(cv_) etc.
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).
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!
Brandon Schaefer (brandontschaefer) wrote : | # |
LGTM
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3727
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3731
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3735
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3736
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3737
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3744
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Brandon Schaefer (brandontschaefer) wrote : | # |
New changes look good!
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3747
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3749
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3752
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3753
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3757
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3761
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3765
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
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 :).
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3766
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3769
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Brandon Schaefer (brandontschaefer) wrote : | # |
New failure in compiling :) (looks like panel_style something about nux object? strange error)
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)
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
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3775
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3777
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3783
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3784
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2014-01-23 09:44:40 +0000 |
3 | +++ CMakeLists.txt 2014-03-03 11:01:22 +0000 |
4 | @@ -219,6 +219,7 @@ |
5 | ${UNITY_PROTOCOL_PRIVATE_DEPS} |
6 | atk |
7 | atk-bridge-2.0 |
8 | + cairo>=1.13.1 |
9 | dbusmenu-glib-0.4 |
10 | dee-1.0 |
11 | gio-2.0>=2.30.0 |
12 | |
13 | === modified file 'UnityCore/DBusIndicators.cpp' |
14 | --- UnityCore/DBusIndicators.cpp 2014-02-11 03:11:47 +0000 |
15 | +++ UnityCore/DBusIndicators.cpp 2014-03-03 11:01:22 +0000 |
16 | @@ -59,6 +59,7 @@ |
17 | void OnDisconnected(); |
18 | |
19 | void OnReSync(GVariant* parameters); |
20 | + void OnIconsPathChanged(GVariant* parameters); |
21 | void OnEntryActivated(GVariant* parameters); |
22 | void OnEntryActivatedRequest(GVariant* parameters); |
23 | void OnEntryShowNowChanged(GVariant* parameters); |
24 | @@ -74,6 +75,7 @@ |
25 | glib::Source::UniquePtr reconnect_timeout_; |
26 | glib::Source::UniquePtr show_entry_idle_; |
27 | glib::Source::UniquePtr show_appmenu_idle_; |
28 | + std::vector<std::string> icon_paths_; |
29 | std::map<std::string, EntryLocationMap> cached_locations_; |
30 | }; |
31 | |
32 | @@ -85,6 +87,7 @@ |
33 | G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES) |
34 | { |
35 | gproxy_.Connect("ReSync", sigc::mem_fun(this, &DBusIndicators::Impl::OnReSync)); |
36 | + gproxy_.Connect("IconPathsChanged", sigc::mem_fun(this, &DBusIndicators::Impl::OnIconsPathChanged)); |
37 | gproxy_.Connect("EntryActivated", sigc::mem_fun(this, &DBusIndicators::Impl::OnEntryActivated)); |
38 | gproxy_.Connect("EntryActivateRequest", sigc::mem_fun(this, &DBusIndicators::Impl::OnEntryActivatedRequest)); |
39 | gproxy_.Connect("EntryShowNowChanged", sigc::mem_fun(this, &DBusIndicators::Impl::OnEntryShowNowChanged)); |
40 | @@ -126,6 +129,7 @@ |
41 | |
42 | void DBusIndicators::Impl::OnConnected() |
43 | { |
44 | + OnIconsPathChanged(nullptr); |
45 | RequestSyncAll(); |
46 | } |
47 | |
48 | @@ -156,6 +160,50 @@ |
49 | } |
50 | } |
51 | |
52 | +void DBusIndicators::Impl::OnIconsPathChanged(GVariant*) |
53 | +{ |
54 | + gproxy_.CallBegin("GetIconPaths", nullptr, [this] (GVariant* paths, glib::Error const& e) { |
55 | + if (e || !paths) |
56 | + { |
57 | + LOG_ERROR(logger) << "Something went wrong on GetIconPaths: " << e; |
58 | + return; |
59 | + } |
60 | + |
61 | + bool changed = false; |
62 | + gsize length; |
63 | + glib::Variant array(g_variant_get_child_value(paths, 0)); |
64 | + const gchar** icon_paths = g_variant_get_strv(array, &length); |
65 | + |
66 | + if (icon_paths_.size() != length) |
67 | + { |
68 | + changed = true; |
69 | + } |
70 | + else |
71 | + { |
72 | + for (unsigned i = 0; i < length; ++i) |
73 | + { |
74 | + if (icon_paths_[i] != glib::gchar_to_string(icon_paths[i])) |
75 | + { |
76 | + changed = true; |
77 | + break; |
78 | + } |
79 | + } |
80 | + } |
81 | + |
82 | + if (changed) |
83 | + { |
84 | + icon_paths_.resize(length); |
85 | + |
86 | + for (unsigned i = 0; i < length; ++i) |
87 | + icon_paths_[i] = glib::gchar_to_string(icon_paths[i]); |
88 | + |
89 | + owner_->icon_paths_changed.emit(); |
90 | + } |
91 | + |
92 | + g_free(icon_paths); |
93 | + }); |
94 | +} |
95 | + |
96 | void DBusIndicators::Impl::OnEntryActivated(GVariant* parameters) |
97 | { |
98 | glib::String panel; |
99 | @@ -458,5 +506,10 @@ |
100 | pimpl->OnShowAppMenu(xid, x, y); |
101 | } |
102 | |
103 | +std::vector<std::string> const& DBusIndicators::IconPaths() const |
104 | +{ |
105 | + return pimpl->icon_paths_; |
106 | +} |
107 | + |
108 | } // namespace indicator |
109 | } // namespace unity |
110 | |
111 | === modified file 'UnityCore/DBusIndicators.h' |
112 | --- UnityCore/DBusIndicators.h 2014-01-28 11:50:02 +0000 |
113 | +++ UnityCore/DBusIndicators.h 2014-03-03 11:01:22 +0000 |
114 | @@ -38,6 +38,7 @@ |
115 | DBusIndicators(); |
116 | ~DBusIndicators(); |
117 | |
118 | + std::vector<std::string> const& IconPaths() const; |
119 | void ShowEntriesDropdown(Indicator::Entries const&, Entry::Ptr const&, unsigned xid, int x, int y); |
120 | void SyncGeometries(std::string const& name, EntryLocationMap const& locations); |
121 | |
122 | |
123 | === modified file 'UnityCore/GTKWrapper.h' |
124 | --- UnityCore/GTKWrapper.h 2013-05-17 16:52:19 +0000 |
125 | +++ UnityCore/GTKWrapper.h 2014-03-03 11:01:22 +0000 |
126 | @@ -29,13 +29,7 @@ |
127 | |
128 | #if GTK_CHECK_VERSION(3, 8, 0) |
129 | |
130 | -class IconInfo : public glib::Object<GtkIconInfo> |
131 | -{ |
132 | -public: |
133 | - IconInfo(GtkIconInfo *info = nullptr) |
134 | - : glib::Object<GtkIconInfo>(info) |
135 | - {} |
136 | -}; |
137 | +typedef glib::Object<GtkIconInfo> IconInfo; |
138 | |
139 | #else |
140 | |
141 | |
142 | === modified file 'UnityCore/Indicators.h' |
143 | --- UnityCore/Indicators.h 2014-02-12 23:37:24 +0000 |
144 | +++ UnityCore/Indicators.h 2014-03-03 11:01:22 +0000 |
145 | @@ -40,6 +40,7 @@ |
146 | virtual ~Indicators(); |
147 | |
148 | IndicatorsList GetIndicators() const; |
149 | + virtual std::vector<std::string> const& IconPaths() const = 0; |
150 | |
151 | virtual void SyncGeometries(std::string const& panel, EntryLocationMap const&) = 0; |
152 | virtual void ShowEntriesDropdown(Indicator::Entries const&, Entry::Ptr const&, unsigned xid, int x, int y) = 0; |
153 | @@ -47,6 +48,7 @@ |
154 | // Signals |
155 | sigc::signal<void, Indicator::Ptr const&> on_object_added; |
156 | sigc::signal<void, Indicator::Ptr const&> on_object_removed; |
157 | + sigc::signal<void> icon_paths_changed; |
158 | |
159 | /** |
160 | * Service wants the view to activate an entry. |
161 | |
162 | === modified file 'dash/DashController.cpp' |
163 | --- dash/DashController.cpp 2014-01-16 00:24:04 +0000 |
164 | +++ dash/DashController.cpp 2014-03-03 11:01:22 +0000 |
165 | @@ -92,7 +92,7 @@ |
166 | } |
167 | |
168 | SetupWindow(); |
169 | - UScreen::GetDefault()->changed.connect([this] (int, std::vector<nux::Geometry>&) { Relayout(true); }); |
170 | + UScreen::GetDefault()->changed.connect([this] (int, std::vector<nux::Geometry> const&) { Relayout(true); }); |
171 | |
172 | Settings::Instance().form_factor.changed.connect([this](FormFactor) |
173 | { |
174 | @@ -249,8 +249,7 @@ |
175 | nux::Geometry geo = GetIdealWindowGeometry(); |
176 | view_->Relayout(); |
177 | window_->SetGeometry(geo); |
178 | - panel::Style &panel_style = panel::Style::Instance(); |
179 | - view_->SetMonitorOffset(launcher_width, panel_style.PanelHeight(monitor_)); |
180 | + view_->SetMonitorOffset(launcher_width, panel::Style::Instance().PanelHeight(monitor_)); |
181 | } |
182 | |
183 | void Controller::OnMouseDownOutsideWindow(int x, int y, |
184 | @@ -299,9 +298,8 @@ |
185 | } |
186 | |
187 | monitor_ = GetIdealMonitor(); |
188 | - |
189 | + view_->SetMonitorOffset(launcher_width, panel::Style::Instance().PanelHeight(monitor_)); |
190 | view_->AboutToShow(); |
191 | - |
192 | FocusWindow(); |
193 | |
194 | need_show_ = false; |
195 | |
196 | === modified file 'dash/DashView.cpp' |
197 | --- dash/DashView.cpp 2014-02-20 21:37:37 +0000 |
198 | +++ dash/DashView.cpp 2014-03-03 11:01:22 +0000 |
199 | @@ -36,7 +36,6 @@ |
200 | #include "unity-shared/DashStyle.h" |
201 | #include "unity-shared/KeyboardUtil.h" |
202 | #include "unity-shared/PreviewStyle.h" |
203 | -#include "unity-shared/PanelStyle.h" |
204 | #include "unity-shared/UBusMessages.h" |
205 | #include "unity-shared/UnitySettings.h" |
206 | #include "unity-shared/WindowManager.h" |
207 | @@ -169,6 +168,8 @@ |
208 | { |
209 | renderer_.x_offset = x; |
210 | renderer_.y_offset = y; |
211 | + |
212 | + top_space_->SetMinMaxSize(0, y); |
213 | } |
214 | |
215 | bool DashView::IsCommandLensOpen() const |
216 | @@ -518,14 +519,14 @@ |
217 | void DashView::SetupViews() |
218 | { |
219 | dash::Style& style = dash::Style::Instance(); |
220 | - panel::Style &panel_style = panel::Style::Instance(); |
221 | - int panel_height = panel_style.PanelHeight(); |
222 | |
223 | layout_ = new nux::VLayout(); |
224 | layout_->SetLeftAndRightPadding(style.GetVSeparatorSize(), 0); |
225 | layout_->SetTopAndBottomPadding(style.GetHSeparatorSize(), 0); |
226 | SetLayout(layout_); |
227 | - layout_->AddLayout(new nux::SpaceLayout(0, 0, panel_height, panel_height), 0); |
228 | + |
229 | + top_space_ = new nux::SpaceLayout(0, 0, renderer_.y_offset(), renderer_.y_offset()); |
230 | + layout_->AddLayout(top_space_, 0); |
231 | |
232 | content_layout_ = new DashLayout(NUX_TRACKER_LOCATION); |
233 | content_layout_->SetTopAndBottomPadding(style.GetDashViewTopPadding(), 0); |
234 | @@ -611,8 +612,7 @@ |
235 | nux::Geometry DashView::GetBestFitGeometry(nux::Geometry const& for_geo) |
236 | { |
237 | dash::Style& style = dash::Style::Instance(); |
238 | - panel::Style &panel_style = panel::Style::Instance(); |
239 | - int panel_height = panel_style.PanelHeight(); |
240 | + int panel_height = renderer_.y_offset; |
241 | |
242 | int width = 0, height = 0; |
243 | int tile_width = style.GetTileWidth(); |
244 | @@ -649,29 +649,25 @@ |
245 | |
246 | void DashView::Draw(nux::GraphicsEngine& graphics_engine, bool force_draw) |
247 | { |
248 | - panel::Style &panel_style = panel::Style::Instance(); |
249 | nux::Geometry const& renderer_geo_abs(GetRenderAbsoluteGeometry()); |
250 | nux::Geometry renderer_geo(GetGeometry()); |
251 | - int panel_height = panel_style.PanelHeight(); |
252 | - |
253 | - renderer_geo.y += panel_height; |
254 | - renderer_geo.height += panel_height; |
255 | + renderer_geo.y += renderer_.y_offset; |
256 | + renderer_geo.height += renderer_.y_offset; |
257 | |
258 | renderer_.DrawFull(graphics_engine, content_geo_, renderer_geo_abs, renderer_geo, false); |
259 | } |
260 | |
261 | void DashView::DrawContent(nux::GraphicsEngine& graphics_engine, bool force_draw) |
262 | { |
263 | - panel::Style& panel_style = panel::Style::Instance(); |
264 | - int panel_height = panel_style.PanelHeight(); |
265 | + int renderer_y_offset = renderer_.y_offset(); |
266 | |
267 | nux::Geometry renderer_geo_abs(GetAbsoluteGeometry()); |
268 | - renderer_geo_abs.y += panel_height; |
269 | - renderer_geo_abs.height -= panel_height; |
270 | + renderer_geo_abs.y += renderer_y_offset; |
271 | + renderer_geo_abs.height -= renderer_y_offset; |
272 | |
273 | nux::Geometry renderer_geo(GetGeometry()); |
274 | - renderer_geo.y += panel_height; |
275 | - renderer_geo.height += panel_height; |
276 | + renderer_geo.y += renderer_y_offset; |
277 | + renderer_geo.height += renderer_y_offset; |
278 | |
279 | renderer_.DrawInner(graphics_engine, content_geo_, renderer_geo_abs, renderer_geo); |
280 | |
281 | @@ -1692,12 +1688,9 @@ |
282 | |
283 | nux::Geometry DashView::GetRenderAbsoluteGeometry() const |
284 | { |
285 | - panel::Style &panel_style = panel::Style::Instance(); |
286 | - int panel_height = panel_style.PanelHeight(); |
287 | - |
288 | nux::Geometry renderer_geo_abs(GetAbsoluteGeometry()); |
289 | - renderer_geo_abs.y += panel_height; |
290 | - renderer_geo_abs.height -= panel_height; |
291 | + renderer_geo_abs.y += renderer_.y_offset; |
292 | + renderer_geo_abs.height -= renderer_.y_offset; |
293 | return renderer_geo_abs; |
294 | } |
295 | |
296 | |
297 | === modified file 'dash/DashView.h' |
298 | --- dash/DashView.h 2013-11-20 21:39:40 +0000 |
299 | +++ dash/DashView.h 2014-03-03 11:01:22 +0000 |
300 | @@ -152,6 +152,7 @@ |
301 | SearchBar* search_bar_; |
302 | nux::VLayout* scopes_layout_; |
303 | ScopeBar* scope_bar_; |
304 | + nux::SpaceLayout* top_space_; |
305 | |
306 | nux::ObjectPtr<ScopeView> active_scope_view_; |
307 | nux::ObjectPtr<ScopeView> preview_scope_view_; |
308 | |
309 | === modified file 'decorations/DecoratedWindow.cpp' |
310 | --- decorations/DecoratedWindow.cpp 2014-02-20 16:24:43 +0000 |
311 | +++ decorations/DecoratedWindow.cpp 2014-03-03 11:01:22 +0000 |
312 | @@ -25,7 +25,6 @@ |
313 | #include "DecorationsTitle.h" |
314 | #include "DecorationsSlidingLayout.h" |
315 | #include "DecorationsMenuLayout.h" |
316 | -#include "RawPixel.h" |
317 | #include "WindowManager.h" |
318 | #include "UnitySettings.h" |
319 | |
320 | @@ -93,6 +92,7 @@ |
321 | return true; |
322 | }); |
323 | |
324 | + parent->dpi_scale.SetGetterFunction([this] { return cv_->DPIScale(); }); |
325 | parent->scaled.changed.connect(sigc::hide(sigc::mem_fun(this, &Impl::Update))); |
326 | |
327 | if (win_->isViewable() || win_->shaded()) |
328 | @@ -141,16 +141,16 @@ |
329 | return; |
330 | |
331 | auto const& sb = Style::Get()->Border(); |
332 | - CompWindowExtents border(RawPixel(sb.left).CP(cv_), |
333 | - RawPixel(sb.right).CP(cv_), |
334 | - RawPixel(sb.top).CP(cv_), |
335 | - RawPixel(sb.bottom).CP(cv_)); |
336 | + CompWindowExtents border(cv_->CP(sb.left), |
337 | + cv_->CP(sb.right), |
338 | + cv_->CP(sb.top), |
339 | + cv_->CP(sb.bottom)); |
340 | |
341 | auto const& ib = Style::Get()->InputBorder(); |
342 | - CompWindowExtents input(RawPixel(sb.left + ib.left).CP(cv_), |
343 | - RawPixel(sb.right + ib.right).CP(cv_), |
344 | - RawPixel(sb.top + ib.top).CP(cv_), |
345 | - RawPixel(sb.bottom + ib.bottom).CP(cv_)); |
346 | + CompWindowExtents input(cv_->CP(sb.left + ib.left), |
347 | + cv_->CP(sb.right + ib.right), |
348 | + cv_->CP(sb.top + ib.top), |
349 | + cv_->CP(sb.bottom + ib.bottom)); |
350 | |
351 | if (win_->border() != border || win_->input() != input) |
352 | win_->setWindowFrameExtents(&border, &input); |
353 | @@ -292,6 +292,11 @@ |
354 | Decorate(); |
355 | }); |
356 | |
357 | + dpi_changed_ = Settings::Instance().dpi_changed.connect([this] { |
358 | + Update(); |
359 | + top_layout_->scale = cv_->DPIScale(); |
360 | + }); |
361 | + |
362 | input_mixer_ = std::make_shared<InputMixer>(); |
363 | |
364 | if (win_->actions() & CompWindowActionResizeMask) |
365 | @@ -314,7 +319,7 @@ |
366 | top_layout_->right_padding = padding.right; |
367 | top_layout_->top_padding = padding.top; |
368 | top_layout_->focused = active(); |
369 | - top_layout_->scale = Settings::Instance().em(monitor_)->DPIScale(); |
370 | + top_layout_->scale = cv_->DPIScale(); |
371 | |
372 | if (win_->actions() & CompWindowActionCloseMask) |
373 | top_layout_->Append(std::make_shared<WindowButton>(win_, WindowButtonType::CLOSE)); |
374 | @@ -353,6 +358,7 @@ |
375 | |
376 | UnsetAppMenu(); |
377 | theme_changed_->disconnect(); |
378 | + dpi_changed_->disconnect(); |
379 | top_layout_.reset(); |
380 | input_mixer_.reset(); |
381 | edge_borders_.reset(); |
382 | @@ -413,9 +419,10 @@ |
383 | |
384 | if (deco_tex.quad.box.width() != geo.width || deco_tex.quad.box.height() != geo.height) |
385 | { |
386 | - cu::CairoContext ctx(geo.width, geo.height); |
387 | + double scale = top_layout_->scale(); |
388 | + cu::CairoContext ctx(geo.width, geo.height, scale); |
389 | auto ws = active() ? WidgetState::NORMAL : WidgetState::BACKDROP; |
390 | - Style::Get()->DrawSide(s, ws, ctx, geo.width, geo.height); |
391 | + Style::Get()->DrawSide(s, ws, ctx, geo.width / scale, geo.height / scale); |
392 | deco_tex.SetTexture(ctx); |
393 | } |
394 | |
395 | @@ -763,7 +770,7 @@ |
396 | .add("active", impl_->active()) |
397 | .add("scaled", scaled()) |
398 | .add("monitor", impl_->monitor_) |
399 | - .add("dpi_scale", impl_->cv_->DPIScale()) |
400 | + .add("dpi_scale", dpi_scale()) |
401 | .add("xid", impl_->win_->id()) |
402 | .add("fully_decorable", cu::IsWindowFullyDecorable(impl_->win_)) |
403 | .add("shadow_decorable", cu::IsWindowShadowDecorable(impl_->win_)) |
404 | |
405 | === modified file 'decorations/DecoratedWindow.h' |
406 | --- decorations/DecoratedWindow.h 2014-02-19 02:16:22 +0000 |
407 | +++ decorations/DecoratedWindow.h 2014-03-03 11:01:22 +0000 |
408 | @@ -43,6 +43,7 @@ |
409 | |
410 | nux::RWProperty<std::string> title; |
411 | nux::Property<bool> scaled; |
412 | + nux::ROProperty<double> dpi_scale; |
413 | |
414 | void Update(); |
415 | void Undecorate(); |
416 | |
417 | === modified file 'decorations/DecorationsDataPool.cpp' |
418 | --- decorations/DecorationsDataPool.cpp 2014-01-16 17:43:36 +0000 |
419 | +++ decorations/DecorationsDataPool.cpp 2014-03-03 11:01:22 +0000 |
420 | @@ -22,6 +22,8 @@ |
421 | #include <sigc++/adaptors/hide.h> |
422 | #include "glow_texture.h" |
423 | #include "DecorationsDataPool.h" |
424 | +#include "UnitySettings.h" |
425 | +#include "UScreen.h" |
426 | |
427 | namespace unity |
428 | { |
429 | @@ -69,8 +71,12 @@ |
430 | SetupCursors(); |
431 | SetupTextures(); |
432 | |
433 | - auto cb = sigc::hide(sigc::mem_fun(this, &DataPool::SetupTextures)); |
434 | - Style::Get()->theme.changed.connect(cb); |
435 | + CompSize glow_size(texture::GLOW_SIZE, texture::GLOW_SIZE); |
436 | + glow_texture_ = std::make_shared<cu::SimpleTexture>(GLTexture::imageDataToTexture(texture::GLOW, glow_size, GL_RGBA, GL_UNSIGNED_BYTE)); |
437 | + |
438 | + auto cb = sigc::mem_fun(this, &DataPool::SetupTextures); |
439 | + Style::Get()->theme.changed.connect(sigc::hide(cb)); |
440 | + unity::Settings::Instance().dpi_changed.connect(cb); |
441 | } |
442 | |
443 | DataPool::~DataPool() |
444 | @@ -98,37 +104,63 @@ |
445 | |
446 | void DataPool::SetupTextures() |
447 | { |
448 | - CompSize size; |
449 | - CompString plugin_name(PLUGIN_NAME); |
450 | auto const& style = Style::Get(); |
451 | - |
452 | - for (unsigned button = 0; button < window_buttons_.size(); ++button) |
453 | + unsigned monitors = UScreen::GetDefault()->GetPluggedMonitorsNumber(); |
454 | + auto& settings = Settings::Instance(); |
455 | + bool found_normal = false; |
456 | + nux::Size size; |
457 | + |
458 | + scaled_window_buttons_.clear(); |
459 | + |
460 | + for (unsigned monitor = 0; monitor < monitors; ++monitor) |
461 | { |
462 | - for (unsigned state = 0; state < window_buttons_[button].size(); ++state) |
463 | - { |
464 | - auto file = style->WindowButtonFile(WindowButtonType(button), WidgetState(state)); |
465 | - auto const& tex_list = GLTexture::readImageToTexture(file, plugin_name, size); |
466 | - |
467 | - if (!tex_list.empty()) |
468 | - { |
469 | - LOG_DEBUG(logger) << "Loading texture " << file; |
470 | - window_buttons_[button][state] = std::make_shared<cu::SimpleTexture>(tex_list); |
471 | - } |
472 | - else |
473 | - { |
474 | - LOG_WARN(logger) << "Impossible to load local button texture file; " |
475 | - << "falling back to cairo generated one"; |
476 | - |
477 | - cu::CairoContext ctx(BUTTONS_SIZE + BUTTONS_PADDING*2, BUTTONS_SIZE + BUTTONS_PADDING*2); |
478 | - cairo_translate(ctx, BUTTONS_PADDING, BUTTONS_PADDING); |
479 | - style->DrawWindowButton(WindowButtonType(button), WidgetState(state), ctx, BUTTONS_SIZE, BUTTONS_SIZE); |
480 | - window_buttons_[button][state] = ctx; |
481 | + double scale = settings.em(monitor)->DPIScale(); |
482 | + bool scaled = (scale != 1.0f); |
483 | + |
484 | + if (!scaled) |
485 | + { |
486 | + if (found_normal) |
487 | + continue; |
488 | + |
489 | + found_normal = true; |
490 | + } |
491 | + |
492 | + auto& destination = scaled ? scaled_window_buttons_[scale] : window_buttons_; |
493 | + |
494 | + for (unsigned button = 0; button < window_buttons_.size(); ++button) |
495 | + { |
496 | + for (unsigned state = 0; state < window_buttons_[button].size(); ++state) |
497 | + { |
498 | + glib::Error error; |
499 | + auto const& file = style->WindowButtonFile(WindowButtonType(button), WidgetState(state)); |
500 | + gdk_pixbuf_get_file_info(file.c_str(), &size.width, &size.height); |
501 | + |
502 | + size.width = std::round(size.width * scale); |
503 | + size.height = std::round(size.height * scale); |
504 | + glib::Object<GdkPixbuf> pixbuf(gdk_pixbuf_new_from_file_at_size(file.c_str(), size.width, size.height, &error)); |
505 | + |
506 | + if (pixbuf) |
507 | + { |
508 | + LOG_DEBUG(logger) << "Loading texture " << file; |
509 | + cu::CairoContext ctx(size.width, size.height); |
510 | + gdk_cairo_set_source_pixbuf(ctx, pixbuf, 0, 0); |
511 | + cairo_paint(ctx); |
512 | + destination[button][state] = ctx; |
513 | + } |
514 | + else |
515 | + { |
516 | + LOG_WARN(logger) << "Impossible to load local button texture file: " |
517 | + << error << "; falling back to cairo generated one."; |
518 | + |
519 | + int button_size = std::round((BUTTONS_SIZE + BUTTONS_PADDING * 2) * scale); |
520 | + cu::CairoContext ctx(button_size, button_size, scale); |
521 | + cairo_translate(ctx, BUTTONS_PADDING, BUTTONS_PADDING); |
522 | + style->DrawWindowButton(WindowButtonType(button), WidgetState(state), ctx, BUTTONS_SIZE, BUTTONS_SIZE); |
523 | + destination[button][state] = ctx; |
524 | + } |
525 | } |
526 | } |
527 | } |
528 | - |
529 | - CompSize glow_size(texture::GLOW_SIZE, texture::GLOW_SIZE); |
530 | - glow_texture_ = std::make_shared<cu::SimpleTexture>(GLTexture::imageDataToTexture(texture::GLOW, glow_size, GL_RGBA, GL_UNSIGNED_BYTE)); |
531 | } |
532 | |
533 | cu::SimpleTexture::Ptr const& DataPool::GlowTexture() const |
534 | @@ -149,5 +181,26 @@ |
535 | return window_buttons_[unsigned(wbt)][unsigned(ws)]; |
536 | } |
537 | |
538 | +cu::SimpleTexture::Ptr const& DataPool::ButtonTexture(double scale, WindowButtonType wbt, WidgetState ws) const |
539 | +{ |
540 | + if (wbt >= WindowButtonType::Size || ws >= WidgetState::Size) |
541 | + { |
542 | + LOG_ERROR(logger) << "It has been requested an invalid button texture " |
543 | + << "WindowButtonType: " << unsigned(wbt) << ", WidgetState: " |
544 | + << unsigned(ws); |
545 | + return EMPTY_BUTTON; |
546 | + } |
547 | + |
548 | + if (scale == 1.0f) |
549 | + return window_buttons_[unsigned(wbt)][unsigned(ws)]; |
550 | + |
551 | + auto it = scaled_window_buttons_.find(scale); |
552 | + |
553 | + if (it == scaled_window_buttons_.end()) |
554 | + return EMPTY_BUTTON; |
555 | + |
556 | + return it->second[unsigned(wbt)][unsigned(ws)]; |
557 | +} |
558 | + |
559 | } // decoration namespace |
560 | } // unity namespace |
561 | |
562 | === modified file 'decorations/DecorationsDataPool.h' |
563 | --- decorations/DecorationsDataPool.h 2014-01-16 17:43:36 +0000 |
564 | +++ decorations/DecorationsDataPool.h 2014-03-03 11:01:22 +0000 |
565 | @@ -20,6 +20,7 @@ |
566 | #ifndef UNITY_DECORATIONS_DATA_POOL |
567 | #define UNITY_DECORATIONS_DATA_POOL |
568 | |
569 | +#include <unordered_map> |
570 | #include "DecorationStyle.h" |
571 | #include "DecorationsEdge.h" |
572 | |
573 | @@ -39,6 +40,7 @@ |
574 | Cursor EdgeCursor(Edge::Type) const; |
575 | cu::SimpleTexture::Ptr const& GlowTexture() const; |
576 | cu::SimpleTexture::Ptr const& ButtonTexture(WindowButtonType, WidgetState) const; |
577 | + cu::SimpleTexture::Ptr const& ButtonTexture(double scale, WindowButtonType, WidgetState) const; |
578 | |
579 | private: |
580 | DataPool(); |
581 | @@ -50,7 +52,10 @@ |
582 | |
583 | std::array<Cursor, size_t(Edge::Type::Size)> edge_cursors_; |
584 | cu::SimpleTexture::Ptr glow_texture_; |
585 | - std::array<std::array<cu::SimpleTexture::Ptr, size_t(WidgetState::Size)>, size_t(WindowButtonType::Size)> window_buttons_; |
586 | + |
587 | + typedef std::array<std::array<cu::SimpleTexture::Ptr, size_t(WidgetState::Size)>, size_t(WindowButtonType::Size)> WindowButtonsArray; |
588 | + WindowButtonsArray window_buttons_; |
589 | + std::unordered_map<double, WindowButtonsArray> scaled_window_buttons_; |
590 | }; |
591 | |
592 | } // decoration namespace |
593 | |
594 | === modified file 'decorations/DecorationsMenuDropdown.cpp' |
595 | --- decorations/DecorationsMenuDropdown.cpp 2014-02-13 00:48:21 +0000 |
596 | +++ decorations/DecorationsMenuDropdown.cpp 2014-03-03 11:01:22 +0000 |
597 | @@ -75,15 +75,12 @@ |
598 | if (std::find(children_.begin(), children_.end(), child) != children_.end()) |
599 | return; |
600 | |
601 | - if (children_.empty()) |
602 | + int size_diff = (child->GetNaturalHeight() - GetNaturalHeight()) / scale(); |
603 | + |
604 | + if (size_diff > 0) |
605 | { |
606 | - int size_diff = child->GetNaturalHeight() - GetNaturalHeight(); |
607 | - |
608 | - if (size_diff > 0) |
609 | - { |
610 | - natural_.height += (size_diff % 2); |
611 | - vertical_padding = vertical_padding() + (size_diff / 2); |
612 | - } |
613 | + natural_.height += (size_diff % 2); |
614 | + vertical_padding = vertical_padding() + (size_diff / 2); |
615 | } |
616 | |
617 | children_.push_front(child); |
618 | @@ -122,14 +119,17 @@ |
619 | void MenuDropdown::RenderTexture() |
620 | { |
621 | WidgetState state = active() ? WidgetState::PRELIGHT : WidgetState::NORMAL; |
622 | - cu::CairoContext icon_ctx(GetNaturalWidth(), GetNaturalHeight()); |
623 | + cu::CairoContext icon_ctx(GetNaturalWidth(), GetNaturalHeight(), scale()); |
624 | |
625 | if (state == WidgetState::PRELIGHT) |
626 | - Style::Get()->DrawMenuItem(state, icon_ctx, icon_ctx.width(), icon_ctx.height()); |
627 | + Style::Get()->DrawMenuItem(state, icon_ctx, icon_ctx.width() / scale(), icon_ctx.height() / scale()); |
628 | |
629 | cairo_save(icon_ctx); |
630 | cairo_translate(icon_ctx, horizontal_padding(), vertical_padding()); |
631 | - Style::Get()->DrawMenuItemIcon(ICON_NAME, state, icon_ctx, ICON_SIZE); |
632 | + cairo_save(icon_ctx); |
633 | + cairo_scale(icon_ctx, 1.0f/scale(), 1.0f/scale()); |
634 | + Style::Get()->DrawMenuItemIcon(ICON_NAME, state, icon_ctx, ICON_SIZE * scale()); |
635 | + cairo_restore(icon_ctx); |
636 | cairo_restore(icon_ctx); |
637 | SetTexture(icon_ctx); |
638 | } |
639 | |
640 | === modified file 'decorations/DecorationsMenuEntry.cpp' |
641 | --- decorations/DecorationsMenuEntry.cpp 2014-02-14 19:01:49 +0000 |
642 | +++ decorations/DecorationsMenuEntry.cpp 2014-03-03 11:01:22 +0000 |
643 | @@ -41,6 +41,7 @@ |
644 | entry_->updated.connect(sigc::mem_fun(this, &MenuEntry::EntryUpdated)); |
645 | horizontal_padding.changed.connect(sigc::hide(sigc::mem_fun(this, &MenuEntry::RenderTexture))); |
646 | vertical_padding.changed.connect(sigc::hide(sigc::mem_fun(this, &MenuEntry::RenderTexture))); |
647 | + scale.changed.connect(sigc::hide(sigc::mem_fun(this, &MenuEntry::RenderTexture))); |
648 | in_dropdown.changed.connect([this] (bool in) { visible = entry_->visible() && !in; }); |
649 | EntryUpdated(); |
650 | } |
651 | @@ -71,10 +72,10 @@ |
652 | state = WidgetState::PRELIGHT; |
653 | |
654 | natural_ = Style::Get()->MenuItemNaturalSize(entry_->label()); |
655 | - cu::CairoContext text_ctx(GetNaturalWidth(), GetNaturalHeight()); |
656 | + cu::CairoContext text_ctx(GetNaturalWidth(), GetNaturalHeight(), scale()); |
657 | |
658 | if (state == WidgetState::PRELIGHT) |
659 | - Style::Get()->DrawMenuItem(state, text_ctx, text_ctx.width(), text_ctx.height()); |
660 | + Style::Get()->DrawMenuItem(state, text_ctx, text_ctx.width() / scale(), text_ctx.height() / scale()); |
661 | |
662 | cairo_save(text_ctx); |
663 | cairo_translate(text_ctx, horizontal_padding(), vertical_padding()); |
664 | @@ -95,12 +96,12 @@ |
665 | |
666 | int MenuEntry::GetNaturalWidth() const |
667 | { |
668 | - return natural_.width + horizontal_padding() * 2; |
669 | + return (natural_.width + horizontal_padding() * 2) * scale(); |
670 | } |
671 | |
672 | int MenuEntry::GetNaturalHeight() const |
673 | { |
674 | - return natural_.height + vertical_padding() * 2; |
675 | + return (natural_.height + vertical_padding() * 2) * scale(); |
676 | } |
677 | |
678 | void MenuEntry::ButtonDownEvent(CompPoint const& p, unsigned button, Time timestamp) |
679 | |
680 | === modified file 'decorations/DecorationsMenuLayout.cpp' |
681 | --- decorations/DecorationsMenuLayout.cpp 2014-02-13 03:33:02 +0000 |
682 | +++ decorations/DecorationsMenuLayout.cpp 2014-03-03 11:01:22 +0000 |
683 | @@ -63,6 +63,7 @@ |
684 | menu->active.changed.connect(active_cb); |
685 | menu->show_now.changed.connect(show_now_cb); |
686 | menu->focused = focused(); |
687 | + menu->scale = scale(); |
688 | menu->SetParent(shared_from_this()); |
689 | items_.push_back(menu); |
690 | } |
691 | @@ -185,8 +186,13 @@ |
692 | |
693 | void MenuLayout::DoRelayout() |
694 | { |
695 | + float scale = this->scale(); |
696 | + int inner_padding = this->inner_padding().CP(scale); |
697 | + int left_padding = this->left_padding().CP(scale); |
698 | + int right_padding = this->right_padding().CP(scale); |
699 | + |
700 | int dropdown_width = dropdown_->GetNaturalWidth(); |
701 | - int accumolated_width = dropdown_width + left_padding() + right_padding() - inner_padding(); |
702 | + int accumolated_width = dropdown_width + left_padding + right_padding - inner_padding; |
703 | int max_width = max_.width; |
704 | std::list<MenuEntry::Ptr> to_hide; |
705 | |
706 | @@ -195,7 +201,7 @@ |
707 | if (!item->visible() || item == dropdown_) |
708 | continue; |
709 | |
710 | - accumolated_width += item->GetNaturalWidth() + inner_padding(); |
711 | + accumolated_width += item->GetNaturalWidth() + inner_padding; |
712 | |
713 | if (accumolated_width > max_width) |
714 | to_hide.push_front(std::static_pointer_cast<MenuEntry>(item)); |
715 | |
716 | === modified file 'decorations/DecorationsPriv.h' |
717 | --- decorations/DecorationsPriv.h 2014-02-19 02:16:22 +0000 |
718 | +++ decorations/DecorationsPriv.h 2014-03-03 11:01:22 +0000 |
719 | @@ -126,6 +126,7 @@ |
720 | nux::Geometry frame_geo_; |
721 | CompRegion frame_region_; |
722 | connection::Wrapper theme_changed_; |
723 | + connection::Wrapper dpi_changed_; |
724 | connection::Wrapper grab_mouse_changed_; |
725 | std::string last_title_; |
726 | std::vector<cu::SimpleTextureQuad> bg_textures_; |
727 | |
728 | === modified file 'decorations/DecorationsSlidingLayout.cpp' |
729 | --- decorations/DecorationsSlidingLayout.cpp 2014-02-19 00:01:16 +0000 |
730 | +++ decorations/DecorationsSlidingLayout.cpp 2014-03-03 11:01:22 +0000 |
731 | @@ -88,6 +88,7 @@ |
732 | { |
733 | input_item_->SetParent(shared_from_this()); |
734 | input_item_->focused = focused(); |
735 | + input_item_->scale = scale(); |
736 | } |
737 | |
738 | Relayout(); |
739 | |
740 | === modified file 'decorations/DecorationsTitle.cpp' |
741 | --- decorations/DecorationsTitle.cpp 2014-01-20 18:10:44 +0000 |
742 | +++ decorations/DecorationsTitle.cpp 2014-03-03 11:01:22 +0000 |
743 | @@ -30,6 +30,7 @@ |
744 | { |
745 | text.changed.connect(sigc::mem_fun(this, &Title::OnTextChanged)); |
746 | focused.changed.connect(sigc::hide(sigc::mem_fun(this, &Title::RenderTexture))); |
747 | + scale.changed.connect([this] (double) { text.changed.emit(text()); }); |
748 | Style::Get()->title_font.changed.connect(sigc::mem_fun(this, &Title::OnFontChanged)); |
749 | } |
750 | |
751 | @@ -37,6 +38,8 @@ |
752 | { |
753 | bool damaged = false; |
754 | auto real_size = Style::Get()->TitleNaturalSize(new_text); |
755 | + real_size.width *= scale(); |
756 | + real_size.height *= scale(); |
757 | |
758 | if (GetNaturalWidth() > real_size.width || GetNaturalHeight() > real_size.height) |
759 | { |
760 | @@ -59,8 +62,8 @@ |
761 | void Title::RenderTexture() |
762 | { |
763 | auto state = focused() ? WidgetState::NORMAL : WidgetState::BACKDROP; |
764 | - cu::CairoContext text_ctx(texture_size_.width, texture_size_.height); |
765 | - Style::Get()->DrawTitle(text(), state, text_ctx, texture_size_.width, texture_size_.height); |
766 | + cu::CairoContext text_ctx(texture_size_.width, texture_size_.height, scale()); |
767 | + Style::Get()->DrawTitle(text(), state, text_ctx, texture_size_.width / scale(), texture_size_.height / scale()); |
768 | SetTexture(text_ctx); |
769 | } |
770 | |
771 | |
772 | === modified file 'decorations/DecorationsWidgets.cpp' |
773 | --- decorations/DecorationsWidgets.cpp 2014-02-19 00:01:16 +0000 |
774 | +++ decorations/DecorationsWidgets.cpp 2014-03-03 11:01:22 +0000 |
775 | @@ -226,17 +226,6 @@ |
776 | |
777 | // |
778 | |
779 | -TexturedItem::TexturedItem() |
780 | -{ |
781 | - scale.changed.connect([this] (float s) { |
782 | - if (texture_.SetScale(s)) |
783 | - { |
784 | - geo_parameters_changed.emit(); |
785 | - Damage(); |
786 | - } |
787 | - }); |
788 | -} |
789 | - |
790 | void TexturedItem::SetTexture(cu::SimpleTexture::Ptr const& tex) |
791 | { |
792 | auto prev_geo = Geometry(); |
793 | @@ -274,12 +263,12 @@ |
794 | |
795 | int TexturedItem::GetNaturalWidth() const |
796 | { |
797 | - return (texture_) ? texture_.st->width() * scale() : Item::GetNaturalWidth(); |
798 | + return (texture_) ? texture_.st->width() : Item::GetNaturalWidth(); |
799 | } |
800 | |
801 | int TexturedItem::GetNaturalHeight() const |
802 | { |
803 | - return (texture_) ? texture_.st->height() * scale() : Item::GetNaturalHeight(); |
804 | + return (texture_) ? texture_.st->height() : Item::GetNaturalHeight(); |
805 | } |
806 | |
807 | CompRect& TexturedItem::InternalGeo() |
808 | @@ -387,8 +376,14 @@ |
809 | |
810 | CompRect Layout::ContentGeometry() const |
811 | { |
812 | - return CompRect(rect_.x() + min(left_padding(), rect_.width()), |
813 | - rect_.y() + min(top_padding(), rect_.height()), |
814 | + float scale = this->scale(); |
815 | + int left_padding = this->left_padding().CP(scale); |
816 | + int right_padding = this->right_padding().CP(scale); |
817 | + int top_padding = this->top_padding().CP(scale); |
818 | + int bottom_padding = this->bottom_padding().CP(scale); |
819 | + |
820 | + return CompRect(rect_.x() + min(left_padding, rect_.width()), |
821 | + rect_.y() + min(top_padding, rect_.height()), |
822 | clamp_size(rect_.width() - left_padding - right_padding), |
823 | clamp_size(rect_.height() - top_padding - bottom_padding)); |
824 | } |
825 | @@ -396,13 +391,19 @@ |
826 | void Layout::DoRelayout() |
827 | { |
828 | int loop = 0; |
829 | + float scale = this->scale(); |
830 | + int inner_padding = this->inner_padding().CP(scale); |
831 | + int left_padding = this->left_padding().CP(scale); |
832 | + int right_padding = this->right_padding().CP(scale); |
833 | + int top_padding = this->top_padding().CP(scale); |
834 | + int bottom_padding = this->bottom_padding().CP(scale); |
835 | |
836 | nux::Size available_space(clamp_size(max_.width - left_padding - right_padding), |
837 | clamp_size(max_.height - top_padding - bottom_padding)); |
838 | |
839 | do |
840 | { |
841 | - nux::Size content(min(left_padding(), max_.width), 0); |
842 | + nux::Size content(min(left_padding, max_.width), 0); |
843 | |
844 | for (auto const& item : items_) |
845 | { |
846 | @@ -428,7 +429,7 @@ |
847 | if (!items_.empty() && content.width > inner_padding) |
848 | content.width -= inner_padding; |
849 | |
850 | - int actual_right_padding = max(0, min(right_padding(), max_.width - content.width)); |
851 | + int actual_right_padding = max(0, min(right_padding, max_.width - content.width)); |
852 | int vertical_padding = top_padding + bottom_padding; |
853 | |
854 | content.width += actual_right_padding; |
855 | @@ -490,7 +491,7 @@ |
856 | } |
857 | } |
858 | |
859 | -bool Layout::SetPadding(int& target, int new_value) |
860 | +bool Layout::SetPadding(RawPixel& target, RawPixel const& new_value) |
861 | { |
862 | int padding = clamp_size(new_value); |
863 | |
864 | |
865 | === modified file 'decorations/DecorationsWidgets.h' |
866 | --- decorations/DecorationsWidgets.h 2014-02-19 00:01:16 +0000 |
867 | +++ decorations/DecorationsWidgets.h 2014-03-03 11:01:22 +0000 |
868 | @@ -26,6 +26,7 @@ |
869 | #include <UnityCore/UWeakPtr.h> |
870 | #include "Introspectable.h" |
871 | #include "CompizUtils.h" |
872 | +#include "RawPixel.h" |
873 | |
874 | namespace unity |
875 | { |
876 | @@ -49,7 +50,7 @@ |
877 | nux::Property<bool> focused; |
878 | nux::Property<bool> sensitive; |
879 | nux::Property<bool> mouse_owner; |
880 | - nux::Property<float> scale; |
881 | + nux::Property<double> scale; |
882 | |
883 | CompRect const& Geometry() const; |
884 | virtual int GetNaturalWidth() const; |
885 | @@ -120,8 +121,6 @@ |
886 | public: |
887 | typedef std::shared_ptr<TexturedItem> Ptr; |
888 | |
889 | - TexturedItem(); |
890 | - |
891 | void SetTexture(cu::SimpleTexture::Ptr const&); |
892 | void Draw(GLWindow*, GLMatrix const&, GLWindowPaintAttrib const&, CompRegion const&, unsigned mask); |
893 | void SetCoords(int x, int y); |
894 | @@ -171,11 +170,11 @@ |
895 | |
896 | Layout(); |
897 | |
898 | - nux::Property<int> inner_padding; |
899 | - nux::Property<int> left_padding; |
900 | - nux::Property<int> right_padding; |
901 | - nux::Property<int> top_padding; |
902 | - nux::Property<int> bottom_padding; |
903 | + nux::Property<RawPixel> inner_padding; |
904 | + nux::Property<RawPixel> left_padding; |
905 | + nux::Property<RawPixel> right_padding; |
906 | + nux::Property<RawPixel> top_padding; |
907 | + nux::Property<RawPixel> bottom_padding; |
908 | |
909 | void Append(Item::Ptr const&); |
910 | void Remove(Item::Ptr const&); |
911 | @@ -189,7 +188,7 @@ |
912 | void DoRelayout(); |
913 | |
914 | private: |
915 | - bool SetPadding(int& target, int new_value); |
916 | + bool SetPadding(RawPixel& target, RawPixel const& new_value); |
917 | }; |
918 | |
919 | } // decoration namespace |
920 | |
921 | === modified file 'decorations/DecorationsWindowButton.cpp' |
922 | --- decorations/DecorationsWindowButton.cpp 2014-02-19 02:16:22 +0000 |
923 | +++ decorations/DecorationsWindowButton.cpp 2014-03-03 11:01:22 +0000 |
924 | @@ -38,12 +38,13 @@ |
925 | auto cb = sigc::hide(sigc::mem_fun(this, &WindowButton::UpdateTexture)); |
926 | mouse_owner.changed.connect(cb); |
927 | focused.changed.connect(cb); |
928 | + scale.changed.connect(cb); |
929 | UpdateTexture(); |
930 | } |
931 | |
932 | void WindowButton::UpdateTexture() |
933 | { |
934 | - SetTexture(DataPool::Get()->ButtonTexture(type_, GetCurrentState())); |
935 | + SetTexture(DataPool::Get()->ButtonTexture(scale(), type_, GetCurrentState())); |
936 | } |
937 | |
938 | WidgetState WindowButton::GetCurrentState() const |
939 | |
940 | === modified file 'hud/HudController.cpp' |
941 | --- hud/HudController.cpp 2014-02-17 17:55:29 +0000 |
942 | +++ hud/HudController.cpp 2014-03-03 11:01:22 +0000 |
943 | @@ -76,7 +76,7 @@ |
944 | } |
945 | |
946 | SetupWindow(); |
947 | - UScreen::GetDefault()->changed.connect([this] (int, std::vector<nux::Geometry>&) { Relayout(true); }); |
948 | + UScreen::GetDefault()->changed.connect([this] (int, std::vector<nux::Geometry> const&) { Relayout(true); }); |
949 | |
950 | ubus.RegisterInterest(UBUS_HUD_CLOSE_REQUEST, sigc::mem_fun(this, &Controller::OnExternalHideHud)); |
951 | |
952 | |
953 | === modified file 'launcher/CairoBaseWindow.cpp' |
954 | --- launcher/CairoBaseWindow.cpp 2014-02-19 14:01:02 +0000 |
955 | +++ launcher/CairoBaseWindow.cpp 2014-03-03 11:01:22 +0000 |
956 | @@ -54,7 +54,10 @@ |
957 | fade_animator_.updated.connect(sigc::mem_fun(this, &BaseWindow::SetOpacity)); |
958 | fade_animator_.finished.connect([this] { |
959 | if (animation::GetDirection(fade_animator_) == animation::Direction::BACKWARD) |
960 | + { |
961 | ShowWindow(false); |
962 | + hidden.emit(); |
963 | + } |
964 | }); |
965 | } |
966 | |
967 | |
968 | === modified file 'launcher/CairoBaseWindow.h' |
969 | --- launcher/CairoBaseWindow.h 2014-02-19 14:01:02 +0000 |
970 | +++ launcher/CairoBaseWindow.h 2014-03-03 11:01:22 +0000 |
971 | @@ -32,7 +32,6 @@ |
972 | NUX_DECLARE_OBJECT_TYPE(CairoBaseWindow, nux::BaseWindow); |
973 | public: |
974 | CairoBaseWindow(int monitor = 0); |
975 | - virtual ~CairoBaseWindow() = default; |
976 | |
977 | virtual void Show(); |
978 | virtual void Hide(); |
979 | @@ -40,6 +39,8 @@ |
980 | void RedrawBlur(); |
981 | bool HasBlurredBackground() const; |
982 | |
983 | + sigc::signal<void> hidden; |
984 | + |
985 | protected: |
986 | void Draw(nux::GraphicsEngine& gfxContext, bool forceDraw); |
987 | |
988 | |
989 | === modified file 'launcher/EdgeBarrierController.cpp' |
990 | --- launcher/EdgeBarrierController.cpp 2013-11-14 03:00:29 +0000 |
991 | +++ launcher/EdgeBarrierController.cpp 2014-03-03 11:01:22 +0000 |
992 | @@ -87,7 +87,7 @@ |
993 | ResizeBarrierList(monitors); |
994 | |
995 | /* FIXME: Back to c++11 lambda once we get sigc::track_obj. |
996 | - uscreen->changed.connect(sigc::track_obj(([this](int primary, std::vector<nux::Geometry>& layout) { |
997 | + uscreen->changed.connect(sigc::track_obj(([this](int primary, std::vector<nux::Geometry> const& layout) { |
998 | ResizeBarrierList(layout); |
999 | SetupBarriers(layout); |
1000 | }));*/ |
1001 | @@ -123,7 +123,7 @@ |
1002 | nux::GetGraphicsDisplay()->RemoveEventFilter(this); |
1003 | } |
1004 | |
1005 | -void EdgeBarrierController::Impl::OnUScreenChanged(int primary, std::vector<nux::Geometry>& layout) |
1006 | +void EdgeBarrierController::Impl::OnUScreenChanged(int primary, std::vector<nux::Geometry> const& layout) |
1007 | { |
1008 | ResizeBarrierList(layout); |
1009 | SetupBarriers(layout); |
1010 | |
1011 | === modified file 'launcher/EdgeBarrierControllerPrivate.h' |
1012 | --- launcher/EdgeBarrierControllerPrivate.h 2013-09-23 20:07:45 +0000 |
1013 | +++ launcher/EdgeBarrierControllerPrivate.h 2014-03-03 11:01:22 +0000 |
1014 | @@ -41,7 +41,7 @@ |
1015 | void ResizeBarrierList(std::vector<nux::Geometry> const& layout); |
1016 | void SetupBarriers(std::vector<nux::Geometry> const& layout); |
1017 | |
1018 | - void OnUScreenChanged(int primary, std::vector<nux::Geometry>& layout); |
1019 | + void OnUScreenChanged(int primary, std::vector<nux::Geometry> const& layout); |
1020 | void OnOptionsChanged(); |
1021 | |
1022 | void OnPointerBarrierEvent(PointerBarrierWrapper* owner, BarrierEvent::Ptr const& event); |
1023 | |
1024 | === modified file 'launcher/Launcher.cpp' |
1025 | --- launcher/Launcher.cpp 2014-02-18 20:41:58 +0000 |
1026 | +++ launcher/Launcher.cpp 2014-03-03 11:01:22 +0000 |
1027 | @@ -145,9 +145,8 @@ |
1028 | , cv_(unity::Settings::Instance().em(monitor)) |
1029 | { |
1030 | icon_renderer_->monitor = monitor(); |
1031 | - icon_renderer_->SetTargetSize(icon_size_.CP(cv_), |
1032 | - DEFAULT_ICON_SIZE.CP(cv_), |
1033 | - SPACE_BETWEEN_ICONS.CP(cv_)); |
1034 | + icon_renderer_->scale = cv_->DPIScale(); |
1035 | + icon_renderer_->SetTargetSize(icon_size_.CP(cv_), DEFAULT_ICON_SIZE.CP(cv_), SPACE_BETWEEN_ICONS.CP(cv_)); |
1036 | |
1037 | CaptureMouseDownAnyWhereElse(true); |
1038 | SetAcceptKeyNavFocusOnMouseDown(false); |
1039 | @@ -254,7 +253,7 @@ |
1040 | .add("quicklist-open", hide_machine_.GetQuirk(LauncherHideMachine::QUICKLIST_OPEN)) |
1041 | .add("hide-quirks", hide_machine_.DebugHideQuirks()) |
1042 | .add("hover-quirks", hover_machine_.DebugHoverQuirks()) |
1043 | - .add("icon-size", icon_size_) |
1044 | + .add("icon-size", icon_size_.CP(cv_)) |
1045 | .add("shortcuts_shown", shortcuts_shown_) |
1046 | .add("tooltip-shown", active_tooltip_ != nullptr); |
1047 | } |
1048 | @@ -330,7 +329,7 @@ |
1049 | |
1050 | void Launcher::OnDPIChanged() |
1051 | { |
1052 | - UpdateOptions(options()); |
1053 | + monitor.changed.emit(monitor()); |
1054 | } |
1055 | |
1056 | void Launcher::SetDndDelta(float x, float y, nux::Geometry const& geo) |
1057 | @@ -1200,11 +1199,11 @@ |
1058 | unity::panel::Style &panel_style = panel::Style::Instance(); |
1059 | int panel_height = panel_style.PanelHeight(new_monitor); |
1060 | |
1061 | - Resize(nux::Point(monitor_geo.x, monitor_geo.y + panel_height), |
1062 | - monitor_geo.height - panel_height); |
1063 | + cv_ = unity::Settings::Instance().em(monitor); |
1064 | + Resize(nux::Point(monitor_geo.x, monitor_geo.y + panel_height), monitor_geo.height - panel_height); |
1065 | + |
1066 | icon_renderer_->monitor = new_monitor; |
1067 | - |
1068 | - cv_ = unity::Settings::Instance().em(monitor); |
1069 | + SetIconSize(options()->tile_size, options()->icon_size); |
1070 | } |
1071 | |
1072 | void Launcher::UpdateOptions(Options::Ptr options) |
1073 | @@ -1492,11 +1491,9 @@ |
1074 | ui::IconRenderer::DestroyShortcutTextures(); |
1075 | |
1076 | icon_size_ = tile_size; |
1077 | - icon_renderer_->SetTargetSize(icon_size_.CP(cv_), |
1078 | - RawPixel(icon_size).CP(cv_), |
1079 | - SPACE_BETWEEN_ICONS.CP(cv_)); |
1080 | - |
1081 | - AbstractLauncherIcon::icon_size = icon_size_.CP(cv_); |
1082 | + icon_renderer_->scale = cv_->DPIScale(); |
1083 | + icon_renderer_->SetTargetSize(icon_size_.CP(cv_), RawPixel(icon_size).CP(cv_), SPACE_BETWEEN_ICONS.CP(cv_)); |
1084 | + AbstractLauncherIcon::icon_size = icon_size_; |
1085 | |
1086 | nux::Geometry const& parent_geo = parent_->GetGeometry(); |
1087 | Resize(nux::Point(parent_geo.x, parent_geo.y), parent_geo.height); |
1088 | |
1089 | === modified file 'launcher/LauncherController.cpp' |
1090 | --- launcher/LauncherController.cpp 2014-02-26 21:27:13 +0000 |
1091 | +++ launcher/LauncherController.cpp 2014-03-03 11:01:22 +0000 |
1092 | @@ -127,7 +127,7 @@ |
1093 | |
1094 | UScreen* uscreen = UScreen::GetDefault(); |
1095 | EnsureLaunchers(uscreen->GetPrimaryMonitor(), uscreen->GetMonitors()); |
1096 | - |
1097 | + uscreen->changed.connect(sigc::mem_fun(this, &Controller::Impl::EnsureLaunchers)); |
1098 | SetupIcons(); |
1099 | |
1100 | remote_model_.entry_added.connect(sigc::mem_fun(this, &Impl::OnLauncherEntryRemoteAdded)); |
1101 | @@ -149,8 +149,6 @@ |
1102 | hud->SetHideMode(mode); |
1103 | }); |
1104 | |
1105 | - uscreen->changed.connect(sigc::mem_fun(this, &Controller::Impl::OnScreenChanged)); |
1106 | - |
1107 | WindowManager& wm = WindowManager::Default(); |
1108 | wm.window_focus_changed.connect(sigc::mem_fun(this, &Controller::Impl::OnWindowFocusChanged)); |
1109 | wm.viewport_layout_changed.connect(sigc::group(sigc::mem_fun(this, &Controller::Impl::UpdateNumWorkspaces), sigc::_1 * sigc::_2)); |
1110 | @@ -171,8 +169,6 @@ |
1111 | } |
1112 | }); |
1113 | |
1114 | - unity::Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &Controller::Impl::OnDPIChanged)); |
1115 | - |
1116 | parent_->AddChild(model_.get()); |
1117 | |
1118 | xdnd_manager_->dnd_started.connect(sigc::mem_fun(this, &Impl::OnDndStarted)); |
1119 | @@ -254,11 +250,6 @@ |
1120 | launchers.resize(num_launchers); |
1121 | } |
1122 | |
1123 | -void Controller::Impl::OnScreenChanged(int primary_monitor, std::vector<nux::Geometry>& monitors) |
1124 | -{ |
1125 | - EnsureLaunchers(primary_monitor, monitors); |
1126 | -} |
1127 | - |
1128 | void Controller::Impl::OnWindowFocusChanged(guint32 xid) |
1129 | { |
1130 | static bool keynav_first_focus = false; |
1131 | @@ -553,22 +544,6 @@ |
1132 | } |
1133 | } |
1134 | |
1135 | -void Controller::Impl::OnDPIChanged() |
1136 | -{ |
1137 | - for (auto const& launcher_ptr : launchers) |
1138 | - { |
1139 | - if (launcher_ptr) |
1140 | - { |
1141 | - nux::Geometry const& parent_geo = launcher_ptr->GetParent()->GetGeometry(); |
1142 | - int monitor = launcher_ptr->monitor(); |
1143 | - int height = panel::Style::Instance().PanelHeight(monitor); |
1144 | - int diff = height - parent_geo.y; |
1145 | - |
1146 | - launcher_ptr->Resize(nux::Point(parent_geo.x, parent_geo.y + diff), parent_geo.height - diff); |
1147 | - } |
1148 | - } |
1149 | -} |
1150 | - |
1151 | void Controller::Impl::OnIconRemoved(AbstractLauncherIcon::Ptr const& icon) |
1152 | { |
1153 | SortAndUpdate(); |
1154 | |
1155 | === modified file 'launcher/LauncherControllerPrivate.h' |
1156 | --- launcher/LauncherControllerPrivate.h 2014-02-18 20:22:05 +0000 |
1157 | +++ launcher/LauncherControllerPrivate.h 2014-03-03 11:01:22 +0000 |
1158 | @@ -98,8 +98,6 @@ |
1159 | |
1160 | void EnsureLaunchers(int primary, std::vector<nux::Geometry> const& monitors); |
1161 | |
1162 | - void OnScreenChanged(int primary_monitor, std::vector<nux::Geometry>& monitors); |
1163 | - |
1164 | void OnWindowFocusChanged (guint32 xid); |
1165 | |
1166 | void OnApplicationStarted(ApplicationPtr const& app); |
1167 | @@ -119,8 +117,6 @@ |
1168 | void OnDndMonitorChanged(std::string const& data, int old_monitor, int new_monitor); |
1169 | GVariant* OnDBusMethodCall(std::string const& method, GVariant *parameters); |
1170 | |
1171 | - void OnDPIChanged(); |
1172 | - |
1173 | Controller* parent_; |
1174 | LauncherModel::Ptr model_; |
1175 | nux::ObjectPtr<Launcher> launcher_; |
1176 | |
1177 | === modified file 'launcher/LauncherIcon.cpp' |
1178 | --- launcher/LauncherIcon.cpp 2014-02-19 02:16:22 +0000 |
1179 | +++ launcher/LauncherIcon.cpp 2014-03-03 11:01:22 +0000 |
1180 | @@ -99,9 +99,6 @@ |
1181 | mouse_up.connect(sigc::mem_fun(this, &LauncherIcon::RecvMouseUp)); |
1182 | mouse_click.connect(sigc::mem_fun(this, &LauncherIcon::RecvMouseClick)); |
1183 | |
1184 | - unity::Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &LauncherIcon::LoadTooltip)); |
1185 | - unity::Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &LauncherIcon::LoadQuicklist)); |
1186 | - |
1187 | for (unsigned i = 0; i < monitors::MAX; ++i) |
1188 | { |
1189 | for (unsigned j = 0; j < static_cast<unsigned>(Quirk::LAST); ++j) |
1190 | @@ -124,6 +121,7 @@ |
1191 | _tooltip = new Tooltip(monitor); |
1192 | _tooltip->SetOpacity(0.0f); |
1193 | _tooltip->text = tooltip_text(); |
1194 | + _tooltip->hidden.connect([this] { _tooltip.Release(); }); |
1195 | debug::Introspectable::AddChild(_tooltip.GetPointer()); |
1196 | } |
1197 | |
1198 | @@ -134,6 +132,7 @@ |
1199 | monitor = 0; |
1200 | |
1201 | _quicklist = new QuicklistView(monitor); |
1202 | + _quicklist->hidden.connect([this] { _quicklist.Release(); }); |
1203 | debug::Introspectable::AddChild(_quicklist.GetPointer()); |
1204 | |
1205 | _quicklist->mouse_down_outside_pointer_grab_area.connect([this] (int x, int y, unsigned long button_flags, unsigned long key_flags) |
1206 | @@ -478,7 +477,8 @@ |
1207 | |
1208 | nux::Point LauncherIcon::GetTipPosition(int monitor) const |
1209 | { |
1210 | - return nux::Point(_center[monitor].x + icon_size()/2 + 1, _center[monitor].y); |
1211 | + auto const& converter = Settings::Instance().em(monitor); |
1212 | + return nux::Point(_center[monitor].x + converter->CP(icon_size()) / 2 + 1, _center[monitor].y); |
1213 | } |
1214 | |
1215 | void LauncherIcon::ShowTooltip() |
1216 | @@ -514,20 +514,17 @@ |
1217 | { |
1218 | MenuItemsVector const& menus = Menus(); |
1219 | |
1220 | - if (!_quicklist) |
1221 | - LoadQuicklist(); |
1222 | - |
1223 | if (menus.empty()) |
1224 | return false; |
1225 | |
1226 | + LoadQuicklist(); |
1227 | + |
1228 | if (_tooltip) |
1229 | { |
1230 | // Hide the tooltip without fade animation |
1231 | _tooltip->ShowWindow(false); |
1232 | } |
1233 | |
1234 | - _quicklist->RemoveAllMenuItem(); |
1235 | - |
1236 | for (auto const& menu_item : menus) |
1237 | { |
1238 | QuicklistMenuItem* ql_item = nullptr; |
1239 | |
1240 | === modified file 'launcher/QuicklistMenuItem.cpp' |
1241 | --- launcher/QuicklistMenuItem.cpp 2014-02-13 10:14:20 +0000 |
1242 | +++ launcher/QuicklistMenuItem.cpp 2014-03-03 11:01:22 +0000 |
1243 | @@ -41,6 +41,7 @@ |
1244 | , _menu_item(item) |
1245 | , _activate_timestamp(0) |
1246 | , _prelight(false) |
1247 | + , _scale(1.0f) |
1248 | { |
1249 | mouse_up.connect(sigc::mem_fun(this, &QuicklistMenuItem::RecvMouseUp)); |
1250 | mouse_click.connect(sigc::mem_fun(this, &QuicklistMenuItem::RecvMouseClick)); |
1251 | @@ -198,15 +199,21 @@ |
1252 | sigMouseLeave.emit(this); |
1253 | } |
1254 | |
1255 | +void QuicklistMenuItem::UpdateTexture() |
1256 | +{ |
1257 | + auto const& geo = GetGeometry(); |
1258 | + nux::CairoGraphics cairo(CAIRO_FORMAT_ARGB32, geo.width * _scale, geo.height * _scale); |
1259 | + cairo_surface_set_device_scale(cairo.GetSurface(), _scale, _scale); |
1260 | + UpdateTexture(cairo, geo.width / _scale, geo.height / _scale); |
1261 | +} |
1262 | + |
1263 | void QuicklistMenuItem::PreLayoutManagement() |
1264 | { |
1265 | _pre_layout_width = GetBaseWidth(); |
1266 | _pre_layout_height = GetBaseHeight(); |
1267 | |
1268 | if (!_normalTexture[0]) |
1269 | - { |
1270 | UpdateTexture(); |
1271 | - } |
1272 | |
1273 | View::PreLayoutManagement(); |
1274 | } |
1275 | @@ -277,7 +284,7 @@ |
1276 | return _text_extents; |
1277 | } |
1278 | |
1279 | -void QuicklistMenuItem::DrawText(nux::CairoGraphics& cairo, int width, int height, nux::Color const& color) |
1280 | +void QuicklistMenuItem::DrawText(nux::CairoGraphics& cairo, double width, double height, nux::Color const& color) |
1281 | { |
1282 | if (_text.empty()) |
1283 | return; |
1284 | @@ -288,8 +295,7 @@ |
1285 | glib::String font_name; |
1286 | g_object_get(settings, "gtk-font-name", &font_name, nullptr); |
1287 | |
1288 | - std::shared_ptr<cairo_t> cairo_context(cairo.GetContext(), cairo_destroy); |
1289 | - cairo_t* cr = cairo_context.get(); |
1290 | + cairo_t* cr = cairo.GetInternalContext(); |
1291 | cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); |
1292 | cairo_set_source_rgba(cr, color.red, color.blue, color.green, color.alpha); |
1293 | cairo_set_font_options(cr, gdk_screen_get_font_options(screen)); |
1294 | @@ -297,6 +303,7 @@ |
1295 | glib::Object<PangoLayout> layout(pango_cairo_create_layout(cr)); |
1296 | std::shared_ptr<PangoFontDescription> desc(pango_font_description_from_string(font_name), pango_font_description_free); |
1297 | pango_layout_set_font_description(layout, desc.get()); |
1298 | + pango_layout_set_height(layout, -1); |
1299 | pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR); |
1300 | |
1301 | if (IsMarkupAccelEnabled()) |
1302 | @@ -334,8 +341,8 @@ |
1303 | int text_width = log_rect.width / PANGO_SCALE; |
1304 | int text_height = log_rect.height / PANGO_SCALE; |
1305 | |
1306 | - _text_extents.width = text_width + ITEM_INDENT_ABS + 3 * ITEM_MARGIN; |
1307 | - _text_extents.height = text_height + 2 * ITEM_MARGIN; |
1308 | + _text_extents.width = std::ceil((text_width + ITEM_INDENT_ABS + 3 * ITEM_MARGIN) * _scale); |
1309 | + _text_extents.height = std::ceil((text_height + 2 * ITEM_MARGIN) * _scale); |
1310 | |
1311 | SetMinimumSize(_text_extents.width, _text_extents.height); |
1312 | |
1313 | @@ -343,10 +350,9 @@ |
1314 | pango_cairo_show_layout(cr, layout); |
1315 | } |
1316 | |
1317 | -void QuicklistMenuItem::DrawPrelight(nux::CairoGraphics& cairo, int width, int height, nux::Color const& color) |
1318 | +void QuicklistMenuItem::DrawPrelight(nux::CairoGraphics& cairo, double width, double height, nux::Color const& color) |
1319 | { |
1320 | - std::shared_ptr<cairo_t> cairo_context(cairo.GetContext(), cairo_destroy); |
1321 | - cairo_t* cr = cairo_context.get(); |
1322 | + cairo_t* cr = cairo.GetInternalContext(); |
1323 | |
1324 | cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); |
1325 | cairo_set_source_rgba(cr, color.red, color.blue, color.green, color.alpha); |
1326 | @@ -414,7 +420,7 @@ |
1327 | if (!_menu_item) |
1328 | return -1; |
1329 | |
1330 | - return dbusmenu_menuitem_property_get_int(_menu_item, MAXIMUM_LABEL_WIDTH_PROPERTY); |
1331 | + return std::ceil(dbusmenu_menuitem_property_get_int(_menu_item, MAXIMUM_LABEL_WIDTH_PROPERTY) * _scale); |
1332 | } |
1333 | |
1334 | bool QuicklistMenuItem::IsOverlayQuicklist() const |
1335 | @@ -434,6 +440,22 @@ |
1336 | return _normalTexture[0]->GetWidth(); |
1337 | } |
1338 | |
1339 | +double QuicklistMenuItem::GetScale() const |
1340 | +{ |
1341 | + return _scale; |
1342 | +} |
1343 | + |
1344 | +void QuicklistMenuItem::SetScale(double scale) |
1345 | +{ |
1346 | + if (scale == _scale) |
1347 | + return; |
1348 | + |
1349 | + _scale = scale; |
1350 | + InitializeText(); |
1351 | + UpdateTexture(); |
1352 | + QueueDraw(); |
1353 | +} |
1354 | + |
1355 | // Introspection |
1356 | |
1357 | std::string QuicklistMenuItem::GetName() const |
1358 | |
1359 | === modified file 'launcher/QuicklistMenuItem.h' |
1360 | --- launcher/QuicklistMenuItem.h 2014-02-13 10:14:20 +0000 |
1361 | +++ launcher/QuicklistMenuItem.h 2014-03-03 11:01:22 +0000 |
1362 | @@ -49,6 +49,8 @@ |
1363 | { |
1364 | NUX_DECLARE_OBJECT_TYPE(QuicklistMenuItem, nux::View); |
1365 | public: |
1366 | + typedef nux::ObjectPtr<QuicklistMenuItem> Ptr; |
1367 | + |
1368 | QuicklistMenuItem(QuicklistMenuItemType type, glib::Object<DbusmenuMenuitem> const& item, NUX_FILE_LINE_PROTO); |
1369 | virtual ~QuicklistMenuItem(); |
1370 | |
1371 | @@ -68,6 +70,9 @@ |
1372 | void SetMaxLabelWidth(int max_width); |
1373 | int GetMaxLabelWidth() const; |
1374 | |
1375 | + virtual void SetScale(double); |
1376 | + double GetScale() const; |
1377 | + |
1378 | bool IsOverlayQuicklist() const; |
1379 | |
1380 | void Activate() const; |
1381 | @@ -76,7 +81,7 @@ |
1382 | bool IsSelected() const; |
1383 | |
1384 | nux::Size const& GetTextExtents() const; |
1385 | - virtual void UpdateTexture() = 0; |
1386 | + void UpdateTexture(); |
1387 | unsigned GetCairoSurfaceWidth() const; |
1388 | |
1389 | sigc::signal<void, QuicklistMenuItem*> sigTextChanged; |
1390 | @@ -117,9 +122,11 @@ |
1391 | |
1392 | void PreLayoutManagement(); |
1393 | long PostLayoutManagement(long layoutResult); |
1394 | + |
1395 | + virtual void UpdateTexture(nux::CairoGraphics&, double width, double height) = 0; |
1396 | void Draw(nux::GraphicsEngine& gfxContext, bool forceDraw); |
1397 | - void DrawText(nux::CairoGraphics& cairo, int width, int height, nux::Color const& color); |
1398 | - void DrawPrelight(nux::CairoGraphics& cairo, int width, int height, nux::Color const& color); |
1399 | + void DrawText(nux::CairoGraphics& cairo, double width, double height, nux::Color const& color); |
1400 | + void DrawPrelight(nux::CairoGraphics& cairo, double width, double height, nux::Color const& color); |
1401 | |
1402 | nux::ObjectPtr<nux::BaseTexture> _normalTexture[2]; |
1403 | nux::ObjectPtr<nux::BaseTexture> _prelightTexture[2]; |
1404 | @@ -129,6 +136,7 @@ |
1405 | bool _prelight; |
1406 | int _pre_layout_width; |
1407 | int _pre_layout_height; |
1408 | + double _scale; |
1409 | nux::Size _text_extents; |
1410 | std::string _text; |
1411 | }; |
1412 | |
1413 | === modified file 'launcher/QuicklistMenuItemCheckmark.cpp' |
1414 | --- launcher/QuicklistMenuItemCheckmark.cpp 2012-08-30 18:14:19 +0000 |
1415 | +++ launcher/QuicklistMenuItemCheckmark.cpp 2014-03-03 11:01:22 +0000 |
1416 | @@ -41,14 +41,9 @@ |
1417 | return "QuicklistMenuItemCheckmark"; |
1418 | } |
1419 | |
1420 | -void QuicklistMenuItemCheckmark::UpdateTexture() |
1421 | +void QuicklistMenuItemCheckmark::UpdateTexture(nux::CairoGraphics& cairoGraphics, double width, double height) |
1422 | { |
1423 | - int width = GetBaseWidth(); |
1424 | - int height = GetBaseHeight(); |
1425 | - |
1426 | - nux::CairoGraphics cairoGraphics(CAIRO_FORMAT_ARGB32, width, height); |
1427 | - std::shared_ptr<cairo_t> cairo_context(cairoGraphics.GetContext(), cairo_destroy); |
1428 | - cairo_t* cr = cairo_context.get(); |
1429 | + cairo_t* cr = cairoGraphics.GetInternalContext(); |
1430 | |
1431 | // draw normal, unchecked version |
1432 | cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); |
1433 | |
1434 | === modified file 'launcher/QuicklistMenuItemCheckmark.h' |
1435 | --- launcher/QuicklistMenuItemCheckmark.h 2012-08-15 02:51:33 +0000 |
1436 | +++ launcher/QuicklistMenuItemCheckmark.h 2014-03-03 11:01:22 +0000 |
1437 | @@ -36,7 +36,7 @@ |
1438 | std::string GetName() const; |
1439 | |
1440 | virtual std::string GetDefaultText() const; |
1441 | - virtual void UpdateTexture(); |
1442 | + virtual void UpdateTexture(nux::CairoGraphics&, double width, double height); |
1443 | }; |
1444 | |
1445 | } // NAMESPACE |
1446 | |
1447 | === modified file 'launcher/QuicklistMenuItemLabel.cpp' |
1448 | --- launcher/QuicklistMenuItemLabel.cpp 2012-08-30 18:14:19 +0000 |
1449 | +++ launcher/QuicklistMenuItemLabel.cpp 2014-03-03 11:01:22 +0000 |
1450 | @@ -41,14 +41,9 @@ |
1451 | return "QuicklistMenuItemLabel"; |
1452 | } |
1453 | |
1454 | -void QuicklistMenuItemLabel::UpdateTexture() |
1455 | +void QuicklistMenuItemLabel::UpdateTexture(nux::CairoGraphics& cairoGraphics, double width, double height) |
1456 | { |
1457 | - int width = GetBaseWidth(); |
1458 | - int height = GetBaseHeight(); |
1459 | - |
1460 | - nux::CairoGraphics cairoGraphics(CAIRO_FORMAT_ARGB32, width, height); |
1461 | - std::shared_ptr<cairo_t> cairo_context(cairoGraphics.GetContext(), cairo_destroy); |
1462 | - cairo_t* cr = cairo_context.get(); |
1463 | + cairo_t* cr = cairoGraphics.GetInternalContext(); |
1464 | |
1465 | // draw normal, unchecked version |
1466 | cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); |
1467 | |
1468 | === modified file 'launcher/QuicklistMenuItemLabel.h' |
1469 | --- launcher/QuicklistMenuItemLabel.h 2012-08-15 02:51:33 +0000 |
1470 | +++ launcher/QuicklistMenuItemLabel.h 2014-03-03 11:01:22 +0000 |
1471 | @@ -36,7 +36,7 @@ |
1472 | std::string GetName() const; |
1473 | |
1474 | virtual std::string GetDefaultText() const; |
1475 | - virtual void UpdateTexture(); |
1476 | + virtual void UpdateTexture(nux::CairoGraphics&, double width, double height); |
1477 | }; |
1478 | |
1479 | } // NAMESPACE |
1480 | |
1481 | === modified file 'launcher/QuicklistMenuItemRadio.cpp' |
1482 | --- launcher/QuicklistMenuItemRadio.cpp 2012-08-30 18:14:19 +0000 |
1483 | +++ launcher/QuicklistMenuItemRadio.cpp 2014-03-03 11:01:22 +0000 |
1484 | @@ -40,14 +40,9 @@ |
1485 | return "QuicklistMenuItemRadio"; |
1486 | } |
1487 | |
1488 | -void QuicklistMenuItemRadio::UpdateTexture() |
1489 | +void QuicklistMenuItemRadio::UpdateTexture(nux::CairoGraphics& cairoGraphics, double width, double height) |
1490 | { |
1491 | - int width = GetBaseWidth(); |
1492 | - int height = GetBaseHeight(); |
1493 | - |
1494 | - nux::CairoGraphics cairoGraphics(CAIRO_FORMAT_ARGB32, width, height); |
1495 | - std::shared_ptr<cairo_t> cairo_context(cairoGraphics.GetContext(), cairo_destroy); |
1496 | - cairo_t* cr = cairo_context.get(); |
1497 | + cairo_t* cr = cairoGraphics.GetInternalContext(); |
1498 | |
1499 | // draw normal, disabled version |
1500 | cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); |
1501 | |
1502 | === modified file 'launcher/QuicklistMenuItemRadio.h' |
1503 | --- launcher/QuicklistMenuItemRadio.h 2012-08-15 02:51:33 +0000 |
1504 | +++ launcher/QuicklistMenuItemRadio.h 2014-03-03 11:01:22 +0000 |
1505 | @@ -35,7 +35,7 @@ |
1506 | std::string GetName() const; |
1507 | |
1508 | virtual std::string GetDefaultText() const; |
1509 | - virtual void UpdateTexture(); |
1510 | + virtual void UpdateTexture(nux::CairoGraphics&, double width, double height); |
1511 | }; |
1512 | |
1513 | } //NAMESPACE |
1514 | |
1515 | === modified file 'launcher/QuicklistMenuItemSeparator.cpp' |
1516 | --- launcher/QuicklistMenuItemSeparator.cpp 2012-08-30 18:14:19 +0000 |
1517 | +++ launcher/QuicklistMenuItemSeparator.cpp 2014-03-03 11:01:22 +0000 |
1518 | @@ -19,18 +19,24 @@ |
1519 | */ |
1520 | |
1521 | #include "unity-shared/CairoTexture.h" |
1522 | +#include "unity-shared/RawPixel.h" |
1523 | #include "QuicklistMenuItemSeparator.h" |
1524 | |
1525 | namespace unity |
1526 | { |
1527 | +namespace |
1528 | +{ |
1529 | +const RawPixel WIDTH = 64_em; |
1530 | +const RawPixel HEIGHT = 7_em; |
1531 | +} |
1532 | |
1533 | QuicklistMenuItemSeparator::QuicklistMenuItemSeparator(glib::Object<DbusmenuMenuitem> const& item, NUX_FILE_LINE_DECL) |
1534 | : QuicklistMenuItem(QuicklistMenuItemType::SEPARATOR, item, NUX_FILE_LINE_PARAM) |
1535 | , _color(1.0f, 1.0f, 1.0f, 0.5f) |
1536 | , _premultiplied_color(0.5f, 0.5f, 0.5f, 0.5f) |
1537 | { |
1538 | - SetMinimumHeight(7); |
1539 | - SetBaseSize(64, 7); |
1540 | + SetMinimumWidth(WIDTH.CP(_scale)); |
1541 | + SetMinimumHeight(HEIGHT.CP(_scale)); |
1542 | } |
1543 | |
1544 | std::string QuicklistMenuItemSeparator::GetName() const |
1545 | @@ -43,6 +49,13 @@ |
1546 | return false; |
1547 | } |
1548 | |
1549 | +void QuicklistMenuItemSeparator::SetScale(double scale) |
1550 | +{ |
1551 | + QuicklistMenuItem::SetScale(scale); |
1552 | + SetMinimumWidth(WIDTH.CP(scale)); |
1553 | + SetMinimumHeight(HEIGHT.CP(scale)); |
1554 | +} |
1555 | + |
1556 | void QuicklistMenuItemSeparator::Draw(nux::GraphicsEngine& gfxContext, bool forceDraw) |
1557 | { |
1558 | // Check if the texture have been computed. If they haven't, exit the function. |
1559 | @@ -67,22 +80,17 @@ |
1560 | gfxContext.PopClippingRectangle(); |
1561 | } |
1562 | |
1563 | -void QuicklistMenuItemSeparator::UpdateTexture() |
1564 | +void QuicklistMenuItemSeparator::UpdateTexture(nux::CairoGraphics& cairoGraphics, double width, double height) |
1565 | { |
1566 | - int width = GetBaseWidth(); |
1567 | - int height = GetBaseHeight(); |
1568 | - |
1569 | - nux::CairoGraphics cairoGraphics(CAIRO_FORMAT_ARGB32, width, height); |
1570 | - std::shared_ptr<cairo_t> cairo_context(cairoGraphics.GetContext(), cairo_destroy); |
1571 | - cairo_t* cr = cairo_context.get(); |
1572 | + cairo_t* cr = cairoGraphics.GetInternalContext(); |
1573 | |
1574 | cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); |
1575 | cairo_set_source_rgba(cr, 0.0f, 0.0f, 0.0f, 0.0f); |
1576 | cairo_paint(cr); |
1577 | cairo_set_source_rgba(cr, _color.red, _color.green, _color.blue, _color.alpha); |
1578 | cairo_set_line_width(cr, 1.0f); |
1579 | - cairo_move_to(cr, 0.0f, 3.5f); |
1580 | - cairo_line_to(cr, width, 3.5f); |
1581 | + cairo_move_to(cr, 0.0f, height/2.0f); |
1582 | + cairo_line_to(cr, width, height/2.0f); |
1583 | cairo_stroke(cr); |
1584 | |
1585 | _normalTexture[0].Adopt(texture_from_cairo_graphics(cairoGraphics)); |
1586 | |
1587 | === modified file 'launcher/QuicklistMenuItemSeparator.h' |
1588 | --- launcher/QuicklistMenuItemSeparator.h 2012-08-15 02:51:33 +0000 |
1589 | +++ launcher/QuicklistMenuItemSeparator.h 2014-03-03 11:01:22 +0000 |
1590 | @@ -37,7 +37,8 @@ |
1591 | void Draw(nux::GraphicsEngine& gfxContext, bool forceDraw); |
1592 | std::string GetName() const; |
1593 | |
1594 | - virtual void UpdateTexture(); |
1595 | + virtual void SetScale(double); |
1596 | + virtual void UpdateTexture(nux::CairoGraphics&, double width, double height); |
1597 | |
1598 | private: |
1599 | nux::Color _color; |
1600 | |
1601 | === modified file 'launcher/QuicklistView.cpp' |
1602 | --- launcher/QuicklistView.cpp 2014-02-19 14:01:02 +0000 |
1603 | +++ launcher/QuicklistView.cpp 2014-03-03 11:01:22 +0000 |
1604 | @@ -40,6 +40,7 @@ |
1605 | |
1606 | #include "unity-shared/Introspectable.h" |
1607 | #include "unity-shared/PanelStyle.h" |
1608 | +#include "unity-shared/DecorationStyle.h" |
1609 | #include "unity-shared/UnitySettings.h" |
1610 | |
1611 | #include "unity-shared/UBusWrapper.h" |
1612 | @@ -320,18 +321,6 @@ |
1613 | } |
1614 | } |
1615 | |
1616 | -QuicklistView::~QuicklistView() |
1617 | -{ |
1618 | - for (auto item : _item_list) |
1619 | - { |
1620 | - // Remove from introspection |
1621 | - RemoveChild(item); |
1622 | - item->UnReference(); |
1623 | - } |
1624 | - |
1625 | - _item_list.clear(); |
1626 | -} |
1627 | - |
1628 | void |
1629 | QuicklistView::EnableQuicklistForTesting(bool enable_testing) |
1630 | { |
1631 | @@ -423,7 +412,7 @@ |
1632 | |
1633 | gfxContext.PushClippingRectangle(base); |
1634 | |
1635 | - for (auto item : _item_list) |
1636 | + for (auto const& item : _item_list) |
1637 | { |
1638 | if (item->GetVisible()) |
1639 | item->ProcessDraw(gfxContext, forceDraw); |
1640 | @@ -440,17 +429,17 @@ |
1641 | int MaxItemWidth = 0; |
1642 | int TotalItemHeight = 0; |
1643 | |
1644 | - for (auto item : _item_list) |
1645 | + for (auto const& item : _item_list) |
1646 | { |
1647 | // Make sure item is in layout if it should be |
1648 | if (!item->GetVisible()) |
1649 | { |
1650 | - _item_layout->RemoveChildObject(item); |
1651 | + _item_layout->RemoveChildObject(item.GetPointer()); |
1652 | continue; |
1653 | } |
1654 | else if (!item->GetParentObject()) |
1655 | { |
1656 | - _item_layout->AddView(item, 1, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); |
1657 | + _item_layout->AddView(item.GetPointer(), 1, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL); |
1658 | } |
1659 | |
1660 | nux::Size const& text_extents = item->GetTextExtents(); |
1661 | @@ -495,7 +484,7 @@ |
1662 | int x = RawPixel(_padding + _anchor_width + _corner_radius + _offset_correction).CP(cv_); |
1663 | int y = _top_space->GetMinimumHeight(); |
1664 | |
1665 | - for (auto item : _item_list) |
1666 | + for (auto const& item : _item_list) |
1667 | { |
1668 | if (!item->GetVisible()) |
1669 | continue; |
1670 | @@ -513,7 +502,7 @@ |
1671 | // has bee set correctly during the layout cycle, but the cairo rendering still need to be adjusted. |
1672 | unsigned separator_width = _item_layout->GetBaseWidth(); |
1673 | |
1674 | - for (auto item : _item_list) |
1675 | + for (auto const& item : _item_list) |
1676 | { |
1677 | if (item->GetVisible() && item->GetCairoSurfaceWidth() != separator_width) |
1678 | { |
1679 | @@ -550,7 +539,7 @@ |
1680 | void QuicklistView::CheckAndEmitItemSignal(int x, int y) |
1681 | { |
1682 | nux::Geometry geo; |
1683 | - for (auto item : _item_list) |
1684 | + for (auto const& item : _item_list) |
1685 | { |
1686 | if (!item->GetVisible()) |
1687 | continue; |
1688 | @@ -561,7 +550,7 @@ |
1689 | if (geo.IsPointInside(x, y)) |
1690 | { |
1691 | // An action is performed: send the signal back to the application |
1692 | - ActivateItem(item); |
1693 | + ActivateItem(item.GetPointer()); |
1694 | } |
1695 | } |
1696 | } |
1697 | @@ -590,18 +579,16 @@ |
1698 | |
1699 | void QuicklistView::CancelItemsPrelightStatus() |
1700 | { |
1701 | - for (auto item : _item_list) |
1702 | - { |
1703 | + for (auto const& item : _item_list) |
1704 | item->Select(false); |
1705 | - } |
1706 | } |
1707 | |
1708 | void QuicklistView::RecvItemMouseDrag(QuicklistMenuItem* item, int x, int y) |
1709 | { |
1710 | nux::Geometry geo; |
1711 | - for (auto it : _item_list) |
1712 | + for (auto const& it : _item_list) |
1713 | { |
1714 | - int item_index = GetItemIndex(it); |
1715 | + int item_index = GetItemIndex(it.GetPointer()); |
1716 | |
1717 | if (!IsMenuItemSelectable(item_index)) |
1718 | continue; |
1719 | @@ -673,24 +660,15 @@ |
1720 | |
1721 | void QuicklistView::RemoveAllMenuItem() |
1722 | { |
1723 | - for (auto item : _item_list) |
1724 | - { |
1725 | - // Remove from introspection |
1726 | - RemoveChild(item); |
1727 | - item->UnReference(); |
1728 | - } |
1729 | - |
1730 | - |
1731 | - _item_list.clear(); |
1732 | - |
1733 | _item_layout->Clear(); |
1734 | + _item_list.clear(); |
1735 | _cairo_text_has_changed = true; |
1736 | - nux::GetWindowThread()->QueueObjectLayout(this); |
1737 | + QueueRelayout(); |
1738 | } |
1739 | |
1740 | void QuicklistView::AddMenuItem(QuicklistMenuItem* item) |
1741 | { |
1742 | - if (item == 0) |
1743 | + if (!item) |
1744 | return; |
1745 | |
1746 | item->sigTextChanged.connect(sigc::mem_fun(this, &QuicklistView::RecvCairoTextChanged)); |
1747 | @@ -700,15 +678,12 @@ |
1748 | item->sigMouseEnter.connect(sigc::mem_fun(this, &QuicklistView::RecvItemMouseEnter)); |
1749 | item->sigMouseLeave.connect(sigc::mem_fun(this, &QuicklistView::RecvItemMouseLeave)); |
1750 | item->sigMouseDrag.connect(sigc::mem_fun(this, &QuicklistView::RecvItemMouseDrag)); |
1751 | + item->SetScale(cv_->DPIScale()); |
1752 | |
1753 | - _item_list.push_back(item); |
1754 | - item->Reference(); |
1755 | - // Add to introspection |
1756 | - AddChild(item); |
1757 | + _item_list.push_back(QuicklistMenuItem::Ptr(item)); |
1758 | |
1759 | _cairo_text_has_changed = true; |
1760 | - nux::GetWindowThread()->QueueObjectLayout(this); |
1761 | - NeedRedraw(); |
1762 | + QueueRelayout(); |
1763 | } |
1764 | |
1765 | void QuicklistView::RenderQuicklistView() |
1766 | @@ -726,10 +701,10 @@ |
1767 | if (index < (int)_item_list.size()) |
1768 | { |
1769 | int i = 0; |
1770 | - for (auto item : _item_list) |
1771 | + for (auto const& item : _item_list) |
1772 | { |
1773 | if (i++ == index) |
1774 | - return item; |
1775 | + return item.GetPointer(); |
1776 | } |
1777 | } |
1778 | |
1779 | @@ -740,7 +715,7 @@ |
1780 | { |
1781 | int index = -1; |
1782 | |
1783 | - for (auto it : _item_list) |
1784 | + for (auto const& it : _item_list) |
1785 | { |
1786 | ++index; |
1787 | |
1788 | @@ -760,7 +735,7 @@ |
1789 | return QuicklistMenuItemType::UNKNOWN; |
1790 | } |
1791 | |
1792 | -std::list<QuicklistMenuItem*> QuicklistView::GetChildren() |
1793 | +std::list<QuicklistMenuItem::Ptr> QuicklistView::GetChildren() |
1794 | { |
1795 | return _item_list; |
1796 | } |
1797 | @@ -771,23 +746,23 @@ |
1798 | } |
1799 | |
1800 | void ql_tint_dot_hl(cairo_t* cr, |
1801 | + gfloat scale, |
1802 | gint width, |
1803 | gint height, |
1804 | gfloat hl_x, |
1805 | gfloat hl_y, |
1806 | gfloat hl_size, |
1807 | - gfloat* rgba_tint, |
1808 | - gfloat* rgba_hl, |
1809 | - gfloat* rgba_dot) |
1810 | + nux::Color const& tint_color, |
1811 | + nux::Color const& hl_color, |
1812 | + nux::Color const& dot_color) |
1813 | { |
1814 | - cairo_surface_t* dots_surf = NULL; |
1815 | - cairo_t* dots_cr = NULL; |
1816 | cairo_pattern_t* dots_pattern = NULL; |
1817 | cairo_pattern_t* hl_pattern = NULL; |
1818 | |
1819 | // create context for dot-pattern |
1820 | - dots_surf = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 4, 4); |
1821 | - dots_cr = cairo_create(dots_surf); |
1822 | + nux::CairoGraphics dots_surf(CAIRO_FORMAT_ARGB32, 4 * scale, 4 * scale); |
1823 | + cairo_surface_set_device_scale(dots_surf.GetSurface(), scale, scale); |
1824 | + cairo_t* dots_cr = dots_surf.GetInternalContext(); |
1825 | |
1826 | // clear normal context |
1827 | cairo_scale(cr, 1.0f, 1.0f); |
1828 | @@ -803,10 +778,10 @@ |
1829 | |
1830 | // fill path of normal context with tint |
1831 | cairo_set_source_rgba(cr, |
1832 | - rgba_tint[0], |
1833 | - rgba_tint[1], |
1834 | - rgba_tint[2], |
1835 | - rgba_tint[3]); |
1836 | + tint_color.red, |
1837 | + tint_color.green, |
1838 | + tint_color.blue, |
1839 | + tint_color.alpha); |
1840 | cairo_fill_preserve(cr); |
1841 | |
1842 | // create pattern in dot-context |
1843 | @@ -815,15 +790,15 @@ |
1844 | cairo_scale(dots_cr, 1.0f, 1.0f); |
1845 | cairo_set_operator(dots_cr, CAIRO_OPERATOR_OVER); |
1846 | cairo_set_source_rgba(dots_cr, |
1847 | - rgba_dot[0], |
1848 | - rgba_dot[1], |
1849 | - rgba_dot[2], |
1850 | - rgba_dot[3]); |
1851 | + dot_color.red, |
1852 | + dot_color.green, |
1853 | + dot_color.blue, |
1854 | + dot_color.alpha); |
1855 | cairo_rectangle(dots_cr, 0.0f, 0.0f, 1.0f, 1.0f); |
1856 | cairo_fill(dots_cr); |
1857 | cairo_rectangle(dots_cr, 2.0f, 2.0f, 1.0f, 1.0f); |
1858 | cairo_fill(dots_cr); |
1859 | - dots_pattern = cairo_pattern_create_for_surface(dots_surf); |
1860 | + dots_pattern = cairo_pattern_create_for_surface(dots_surf.GetSurface()); |
1861 | |
1862 | // fill path of normal context with dot-pattern |
1863 | cairo_set_operator(cr, CAIRO_OPERATOR_OVER); |
1864 | @@ -831,8 +806,6 @@ |
1865 | cairo_pattern_set_extend(dots_pattern, CAIRO_EXTEND_REPEAT); |
1866 | cairo_fill_preserve(cr); |
1867 | cairo_pattern_destroy(dots_pattern); |
1868 | - cairo_surface_destroy(dots_surf); |
1869 | - cairo_destroy(dots_cr); |
1870 | |
1871 | // draw highlight |
1872 | cairo_set_operator(cr, CAIRO_OPERATOR_OVER); |
1873 | @@ -844,10 +817,10 @@ |
1874 | hl_size); |
1875 | cairo_pattern_add_color_stop_rgba(hl_pattern, |
1876 | 0.0f, |
1877 | - rgba_hl[0], |
1878 | - rgba_hl[1], |
1879 | - rgba_hl[2], |
1880 | - rgba_hl[3]); |
1881 | + hl_color.red, |
1882 | + hl_color.green, |
1883 | + hl_color.blue, |
1884 | + hl_color.alpha); |
1885 | cairo_pattern_add_color_stop_rgba(hl_pattern, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f); |
1886 | cairo_set_source(cr, hl_pattern); |
1887 | cairo_fill(cr); |
1888 | @@ -857,17 +830,8 @@ |
1889 | void ql_setup(cairo_surface_t** surf, |
1890 | cairo_t** cr, |
1891 | gboolean outline, |
1892 | - gint width, |
1893 | - gint height, |
1894 | gboolean negative) |
1895 | { |
1896 | -// // create context |
1897 | -// if (outline) |
1898 | -// *surf = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); |
1899 | -// else |
1900 | -// *surf = cairo_image_surface_create (CAIRO_FORMAT_A8, width, height); |
1901 | -// *cr = cairo_create (*surf); |
1902 | - |
1903 | // clear context |
1904 | cairo_scale(*cr, 1.0f, 1.0f); |
1905 | if (outline) |
1906 | @@ -889,8 +853,8 @@ |
1907 | void ql_compute_full_mask_path(cairo_t* cr, |
1908 | gfloat anchor_width, |
1909 | gfloat anchor_height, |
1910 | - gint width, |
1911 | - gint height, |
1912 | + gfloat width, |
1913 | + gfloat height, |
1914 | gint upper_size, |
1915 | gfloat radius, |
1916 | guint pad) |
1917 | @@ -1009,7 +973,7 @@ |
1918 | |
1919 | void ql_compute_outline(cairo_t* cr, |
1920 | gfloat line_width, |
1921 | - gfloat* rgba_line, |
1922 | + nux::Color const& line_color, |
1923 | gfloat size) |
1924 | { |
1925 | cairo_pattern_t* pattern = NULL; |
1926 | @@ -1021,25 +985,25 @@ |
1927 | |
1928 | pattern = cairo_pattern_create_linear(x, y, size, y); |
1929 | cairo_pattern_add_color_stop_rgba(pattern, 0.0f, |
1930 | - rgba_line[0], |
1931 | - rgba_line[1], |
1932 | - rgba_line[2], |
1933 | - rgba_line[3]); |
1934 | + line_color.red, |
1935 | + line_color.green, |
1936 | + line_color.blue, |
1937 | + line_color.alpha); |
1938 | cairo_pattern_add_color_stop_rgba(pattern, offset, |
1939 | - rgba_line[0], |
1940 | - rgba_line[1], |
1941 | - rgba_line[2], |
1942 | - rgba_line[3]); |
1943 | + line_color.red, |
1944 | + line_color.green, |
1945 | + line_color.blue, |
1946 | + line_color.alpha); |
1947 | cairo_pattern_add_color_stop_rgba(pattern, 1.1f * offset, |
1948 | - rgba_line[0] * 0.65f, |
1949 | - rgba_line[1] * 0.65f, |
1950 | - rgba_line[2] * 0.65f, |
1951 | - rgba_line[3]); |
1952 | + line_color.red * 0.65f, |
1953 | + line_color.green * 0.65f, |
1954 | + line_color.blue * 0.65f, |
1955 | + line_color.alpha); |
1956 | cairo_pattern_add_color_stop_rgba(pattern, 1.0f, |
1957 | - rgba_line[0] * 0.65f, |
1958 | - rgba_line[1] * 0.65f, |
1959 | - rgba_line[2] * 0.65f, |
1960 | - rgba_line[3]); |
1961 | + line_color.red * 0.65f, |
1962 | + line_color.green * 0.65f, |
1963 | + line_color.blue * 0.65f, |
1964 | + line_color.alpha); |
1965 | cairo_set_source(cr, pattern); |
1966 | cairo_set_line_width(cr, line_width); |
1967 | cairo_stroke(cr); |
1968 | @@ -1049,7 +1013,7 @@ |
1969 | void ql_draw(cairo_t* cr, |
1970 | gboolean outline, |
1971 | gfloat line_width, |
1972 | - gfloat* rgba, |
1973 | + nux::Color const& color, |
1974 | gboolean negative, |
1975 | gboolean stroke) |
1976 | { |
1977 | @@ -1060,7 +1024,7 @@ |
1978 | if (outline) |
1979 | { |
1980 | cairo_set_line_width(cr, line_width); |
1981 | - cairo_set_source_rgba(cr, rgba[0], rgba[1], rgba[2], rgba[3]); |
1982 | + cairo_set_source_rgba(cr, color.red, color.green, color.blue, color.alpha); |
1983 | } |
1984 | else |
1985 | { |
1986 | @@ -1080,7 +1044,7 @@ |
1987 | void ql_finalize(cairo_t** cr, |
1988 | gboolean outline, |
1989 | gfloat line_width, |
1990 | - gfloat* rgba, |
1991 | + nux::Color const& color, |
1992 | gboolean negative, |
1993 | gboolean stroke) |
1994 | { |
1995 | @@ -1091,7 +1055,7 @@ |
1996 | if (outline) |
1997 | { |
1998 | cairo_set_line_width(*cr, line_width); |
1999 | - cairo_set_source_rgba(*cr, rgba[0], rgba[1], rgba[2], rgba[3]); |
2000 | + cairo_set_source_rgba(*cr, color.red, color.green, color.blue, color.alpha); |
2001 | } |
2002 | else |
2003 | { |
2004 | @@ -1112,19 +1076,19 @@ |
2005 | ql_compute_full_outline_shadow( |
2006 | cairo_t* cr, |
2007 | cairo_surface_t* surf, |
2008 | - gint width, |
2009 | - gint height, |
2010 | + gfloat width, |
2011 | + gfloat height, |
2012 | gfloat anchor_width, |
2013 | gfloat anchor_height, |
2014 | gint upper_size, |
2015 | gfloat corner_radius, |
2016 | guint blur_coeff, |
2017 | - gfloat* rgba_shadow, |
2018 | + nux::Color const& rgba_shadow, |
2019 | gfloat line_width, |
2020 | gint padding_size, |
2021 | - gfloat* rgba_line) |
2022 | + nux::Color const& rgba_line) |
2023 | { |
2024 | - ql_setup(&surf, &cr, TRUE, width, height, FALSE); |
2025 | + ql_setup(&surf, &cr, TRUE, FALSE); |
2026 | ql_compute_full_mask_path(cr, |
2027 | anchor_width, |
2028 | anchor_height, |
2029 | @@ -1144,10 +1108,9 @@ |
2030 | void ql_compute_full_mask( |
2031 | cairo_t* cr, |
2032 | cairo_surface_t* surf, |
2033 | - gint width, |
2034 | - gint height, |
2035 | + gfloat width, |
2036 | + gfloat height, |
2037 | gfloat radius, |
2038 | - guint shadow_radius, |
2039 | gfloat anchor_width, |
2040 | gfloat anchor_height, |
2041 | gint upper_size, |
2042 | @@ -1155,9 +1118,9 @@ |
2043 | gboolean outline, |
2044 | gfloat line_width, |
2045 | gint padding_size, |
2046 | - gfloat* rgba) |
2047 | + nux::Color const& rgba) |
2048 | { |
2049 | - ql_setup(&surf, &cr, outline, width, height, negative); |
2050 | + ql_setup(&surf, &cr, outline, negative); |
2051 | ql_compute_full_mask_path(cr, |
2052 | anchor_width, |
2053 | anchor_height, |
2054 | @@ -1210,26 +1173,33 @@ |
2055 | } |
2056 | } |
2057 | |
2058 | - float blur_coef = 6.0f; |
2059 | + auto const& deco_style = decoration::Style::Get(); |
2060 | + float dpi_scale = cv_->DPIScale(); |
2061 | + float blur_coef = std::round(deco_style->ActiveShadowRadius() * dpi_scale / 2.0f); |
2062 | |
2063 | nux::CairoGraphics cairo_bg(CAIRO_FORMAT_ARGB32, width, height); |
2064 | nux::CairoGraphics cairo_mask(CAIRO_FORMAT_ARGB32, width, height); |
2065 | nux::CairoGraphics cairo_outline(CAIRO_FORMAT_ARGB32, width, height); |
2066 | |
2067 | - cairo_t* cr_bg = cairo_bg.GetContext(); |
2068 | - cairo_t* cr_mask = cairo_mask.GetContext(); |
2069 | - cairo_t* cr_outline = cairo_outline.GetContext(); |
2070 | - |
2071 | - float tint_color[4] = {0.0f, 0.0f, 0.0f, HasBlurredBackground() ? 0.60f : 1.0f}; |
2072 | - float hl_color[4] = {1.0f, 1.0f, 1.0f, 0.35f}; |
2073 | - float dot_color[4] = {1.0f, 1.0f, 1.0f, 0.03f}; |
2074 | - float shadow_color[4] = {0.0f, 0.0f, 0.0f, 1.00f}; |
2075 | - float outline_color[4] = {1.0f, 1.0f, 1.0f, 0.40f}; |
2076 | - float mask_color[4] = {1.0f, 1.0f, 1.0f, 1.00f}; |
2077 | + cairo_surface_set_device_scale(cairo_bg.GetSurface(), dpi_scale, dpi_scale); |
2078 | + cairo_surface_set_device_scale(cairo_mask.GetSurface(), dpi_scale, dpi_scale); |
2079 | + cairo_surface_set_device_scale(cairo_outline.GetSurface(), dpi_scale, dpi_scale); |
2080 | + |
2081 | + cairo_t* cr_bg = cairo_bg.GetInternalContext(); |
2082 | + cairo_t* cr_mask = cairo_mask.GetInternalContext(); |
2083 | + cairo_t* cr_outline = cairo_outline.GetInternalContext(); |
2084 | + |
2085 | + nux::Color tint_color(0.0f, 0.0f, 0.0f, HasBlurredBackground() ? 0.60f : 1.0f); |
2086 | + nux::Color hl_color(1.0f, 1.0f, 1.0f, 0.35f); |
2087 | + nux::Color dot_color(1.0f, 1.0f, 1.0f, 0.03f); |
2088 | + nux::Color shadow_color(deco_style->ActiveShadowColor()); |
2089 | + nux::Color outline_color(1.0f, 1.0f, 1.0f, 0.40f); |
2090 | + nux::Color mask_color(1.0f, 1.0f, 1.0f, 1.00f); |
2091 | |
2092 | ql_tint_dot_hl(cr_bg, |
2093 | - width, |
2094 | - height, |
2095 | + dpi_scale, |
2096 | + width / dpi_scale, |
2097 | + height / dpi_scale, |
2098 | width / 2.0f, |
2099 | 0, |
2100 | nux::Max<float>(width / 1.6f, height / 1.6f), |
2101 | @@ -1241,38 +1211,33 @@ |
2102 | ( |
2103 | cr_outline, |
2104 | cairo_outline.GetSurface(), |
2105 | - width, |
2106 | - height, |
2107 | - _anchor_width.CP(cv_), |
2108 | - _anchor_height.CP(cv_), |
2109 | - size_above_anchor.CP(cv_), |
2110 | - _corner_radius.CP(cv_), |
2111 | + width / dpi_scale, |
2112 | + height / dpi_scale, |
2113 | + _anchor_width, |
2114 | + _anchor_height, |
2115 | + size_above_anchor, |
2116 | + _corner_radius, |
2117 | blur_coef, |
2118 | shadow_color, |
2119 | - 1.0f, |
2120 | - _padding.CP(cv_), |
2121 | + 1.0f * dpi_scale, |
2122 | + _padding, |
2123 | outline_color); |
2124 | |
2125 | ql_compute_full_mask( |
2126 | cr_mask, |
2127 | cairo_mask.GetSurface(), |
2128 | - width, |
2129 | - height, |
2130 | - _corner_radius.CP(cv_), // radius, |
2131 | - RawPixel(16).CP(cv_), // shadow_radius, |
2132 | - _anchor_width.CP(cv_), // anchor_width, |
2133 | - _anchor_height.CP(cv_), // anchor_height, |
2134 | - size_above_anchor.CP(cv_), // upper_size, |
2135 | + width / dpi_scale, |
2136 | + height / dpi_scale, |
2137 | + _corner_radius, // radius, |
2138 | + _anchor_width, // anchor_width, |
2139 | + _anchor_height, // anchor_height, |
2140 | + size_above_anchor, // upper_size, |
2141 | true, // negative, |
2142 | false, // outline, |
2143 | 1.0, // line_width, |
2144 | - _padding.CP(cv_), // padding_size, |
2145 | + _padding, // padding_size, |
2146 | mask_color); |
2147 | |
2148 | - cairo_destroy(cr_bg); |
2149 | - cairo_destroy(cr_outline); |
2150 | - cairo_destroy(cr_mask); |
2151 | - |
2152 | texture_bg_ = texture_ptr_from_cairo_graphics(cairo_bg); |
2153 | texture_mask_ = texture_ptr_from_cairo_graphics(cairo_mask); |
2154 | texture_outline_ = texture_ptr_from_cairo_graphics(cairo_outline); |
2155 | @@ -1341,12 +1306,12 @@ |
2156 | |
2157 | debug::Introspectable::IntrospectableList QuicklistView::GetIntrospectableChildren() |
2158 | { |
2159 | - _introspectable_children.clear(); |
2160 | - for (auto item: _item_list) |
2161 | - { |
2162 | - _introspectable_children.push_back(item); |
2163 | - } |
2164 | - return _introspectable_children; |
2165 | + debug::Introspectable::IntrospectableList list(_item_list.size()); |
2166 | + |
2167 | + for (auto const& item: _item_list) |
2168 | + list.push_back(item.GetPointer()); |
2169 | + |
2170 | + return list; |
2171 | } |
2172 | |
2173 | } // NAMESPACE |
2174 | |
2175 | === modified file 'launcher/QuicklistView.h' |
2176 | --- launcher/QuicklistView.h 2014-02-19 14:01:02 +0000 |
2177 | +++ launcher/QuicklistView.h 2014-03-03 11:01:22 +0000 |
2178 | @@ -46,7 +46,6 @@ |
2179 | NUX_DECLARE_OBJECT_TYPE(QuicklistView, unity::CairoBaseWindow); |
2180 | public: |
2181 | QuicklistView(int monitor = 0); |
2182 | - ~QuicklistView(); |
2183 | |
2184 | void SetText(std::string const& text); |
2185 | |
2186 | @@ -67,7 +66,7 @@ |
2187 | QuicklistMenuItem* GetNthItems(int index); |
2188 | QuicklistMenuItemType GetNthType(int index); |
2189 | int GetItemIndex(QuicklistMenuItem* item); |
2190 | - std::list<QuicklistMenuItem*> GetChildren(); |
2191 | + std::list<QuicklistMenuItem::Ptr> GetChildren(); |
2192 | void SelectFirstItem(); |
2193 | |
2194 | void TestMenuItems(DbusmenuMenuitem* root); |
2195 | @@ -171,13 +170,10 @@ |
2196 | |
2197 | bool _cairo_text_has_changed; |
2198 | void UpdateTexture(); |
2199 | - std::list<QuicklistMenuItem*> _item_list; |
2200 | + std::list<QuicklistMenuItem::Ptr> _item_list; |
2201 | |
2202 | // used by keyboard/a11y-navigation |
2203 | int _current_item_index; |
2204 | - |
2205 | - // list of introspectable children, used to return children in the correct order: |
2206 | - IntrospectableList _introspectable_children; |
2207 | }; |
2208 | |
2209 | } // NAMESPACE |
2210 | |
2211 | === modified file 'launcher/Tooltip.cpp' |
2212 | --- launcher/Tooltip.cpp 2014-02-19 14:01:02 +0000 |
2213 | +++ launcher/Tooltip.cpp 2014-03-03 11:01:22 +0000 |
2214 | @@ -25,6 +25,7 @@ |
2215 | #include <unity-shared/CairoTexture.h> |
2216 | #include <unity-shared/RawPixel.h> |
2217 | #include <unity-shared/UnitySettings.h> |
2218 | +#include "unity-shared/DecorationStyle.h" |
2219 | |
2220 | #include "Tooltip.h" |
2221 | |
2222 | @@ -59,6 +60,7 @@ |
2223 | _vlayout->AddLayout(_top_space, 0); |
2224 | |
2225 | _tooltip_text = new StaticCairoText(TEXT(""), NUX_TRACKER_LOCATION); |
2226 | + _tooltip_text->SetScale(cv_->DPIScale()); |
2227 | _tooltip_text->SetTextAlignment(StaticCairoText::AlignState::NUX_ALIGN_CENTRE); |
2228 | _tooltip_text->SetTextVerticalAlignment(StaticCairoText::AlignState::NUX_ALIGN_CENTRE); |
2229 | _tooltip_text->SetMinimumWidth(MINIMUM_TEXT_WIDTH.CP(cv_)); |
2230 | @@ -169,14 +171,14 @@ |
2231 | ///////////////////////////////////////////////////////////////////////////////////////////////// |
2232 | |
2233 | void tint_dot_hl(cairo_t* cr, |
2234 | - gint width, |
2235 | - gint height, |
2236 | + gfloat width, |
2237 | + gfloat height, |
2238 | gfloat hl_x, |
2239 | gfloat hl_y, |
2240 | gfloat hl_size, |
2241 | - gfloat* rgba_tint, |
2242 | - gfloat* rgba_hl, |
2243 | - gfloat* rgba_dot) |
2244 | + nux::Color const& tint_color, |
2245 | + nux::Color const& hl_color, |
2246 | + nux::Color const& dot_color) |
2247 | { |
2248 | cairo_pattern_t* hl_pattern = NULL; |
2249 | |
2250 | @@ -190,14 +192,14 @@ |
2251 | cairo_set_operator(cr, CAIRO_OPERATOR_OVER); |
2252 | |
2253 | // create path in normal context |
2254 | - cairo_rectangle(cr, 0.0f, 0.0f, (gdouble) width, (gdouble) height); |
2255 | + cairo_rectangle(cr, 0.0f, 0.0f, width, height); |
2256 | |
2257 | // fill path of normal context with tint |
2258 | cairo_set_source_rgba(cr, |
2259 | - rgba_tint[0], |
2260 | - rgba_tint[1], |
2261 | - rgba_tint[2], |
2262 | - rgba_tint[3]); |
2263 | + tint_color.red, |
2264 | + tint_color.green, |
2265 | + tint_color.blue, |
2266 | + tint_color.alpha); |
2267 | cairo_fill_preserve(cr); |
2268 | |
2269 | // draw glow |
2270 | @@ -209,10 +211,10 @@ |
2271 | hl_size); |
2272 | cairo_pattern_add_color_stop_rgba(hl_pattern, |
2273 | 0.0f, |
2274 | - rgba_hl[0], |
2275 | - rgba_hl[1], |
2276 | - rgba_hl[2], |
2277 | - rgba_hl[3]); |
2278 | + hl_color.red, |
2279 | + hl_color.green, |
2280 | + hl_color.blue, |
2281 | + hl_color.alpha); |
2282 | cairo_pattern_add_color_stop_rgba(hl_pattern, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f); |
2283 | cairo_set_source(cr, hl_pattern); |
2284 | cairo_fill(cr); |
2285 | @@ -222,8 +224,6 @@ |
2286 | void _setup(cairo_surface_t** surf, |
2287 | cairo_t** cr, |
2288 | gboolean outline, |
2289 | - gint width, |
2290 | - gint height, |
2291 | gboolean negative) |
2292 | { |
2293 | // clear context |
2294 | @@ -247,8 +247,8 @@ |
2295 | void _compute_full_mask_path(cairo_t* cr, |
2296 | gfloat anchor_width, |
2297 | gfloat anchor_height, |
2298 | - gint width, |
2299 | - gint height, |
2300 | + gfloat width, |
2301 | + gfloat height, |
2302 | gint upper_size, |
2303 | gfloat radius, |
2304 | guint pad) |
2305 | @@ -305,14 +305,14 @@ |
2306 | |
2307 | void compute_outline(cairo_t* cr, |
2308 | gfloat line_width, |
2309 | - gfloat* rgba_line) |
2310 | + nux::Color const& line_color) |
2311 | { |
2312 | cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); |
2313 | cairo_set_source_rgba(cr, |
2314 | - rgba_line[0], |
2315 | - rgba_line[1], |
2316 | - rgba_line[2], |
2317 | - rgba_line[3]); |
2318 | + line_color.red, |
2319 | + line_color.green, |
2320 | + line_color.blue, |
2321 | + line_color.alpha); |
2322 | cairo_set_line_width(cr, line_width); |
2323 | cairo_stroke(cr); |
2324 | } |
2325 | @@ -320,7 +320,7 @@ |
2326 | void _draw(cairo_t* cr, |
2327 | gboolean outline, |
2328 | gfloat line_width, |
2329 | - gfloat* rgba, |
2330 | + nux::Color const& color, |
2331 | gboolean negative, |
2332 | gboolean stroke) |
2333 | { |
2334 | @@ -331,7 +331,7 @@ |
2335 | if (outline) |
2336 | { |
2337 | cairo_set_line_width(cr, line_width); |
2338 | - cairo_set_source_rgba(cr, rgba[0], rgba[1], rgba[2], rgba[3]); |
2339 | + cairo_set_source_rgba(cr, color.red, color.green, color.blue, color.alpha); |
2340 | } |
2341 | else |
2342 | { |
2343 | @@ -351,7 +351,7 @@ |
2344 | void _finalize(cairo_t** cr, |
2345 | gboolean outline, |
2346 | gfloat line_width, |
2347 | - gfloat* rgba, |
2348 | + nux::Color const& color, |
2349 | gboolean negative, |
2350 | gboolean stroke) |
2351 | { |
2352 | @@ -362,7 +362,7 @@ |
2353 | if (outline) |
2354 | { |
2355 | cairo_set_line_width(*cr, line_width); |
2356 | - cairo_set_source_rgba(*cr, rgba[0], rgba[1], rgba[2], rgba[3]); |
2357 | + cairo_set_source_rgba(*cr, color.red, color.green, color.blue, color.alpha); |
2358 | } |
2359 | else |
2360 | { |
2361 | @@ -383,19 +383,19 @@ |
2362 | compute_full_outline_shadow( |
2363 | cairo_t* cr, |
2364 | cairo_surface_t* surf, |
2365 | - gint width, |
2366 | - gint height, |
2367 | + gfloat width, |
2368 | + gfloat height, |
2369 | gfloat anchor_width, |
2370 | gfloat anchor_height, |
2371 | gint upper_size, |
2372 | gfloat corner_radius, |
2373 | guint blur_coeff, |
2374 | - gfloat* rgba_shadow, |
2375 | + nux::Color const& shadow_color, |
2376 | gfloat line_width, |
2377 | gint padding_size, |
2378 | - gfloat* rgba_line) |
2379 | + nux::Color const& line_color) |
2380 | { |
2381 | - _setup(&surf, &cr, TRUE, width, height, FALSE); |
2382 | + _setup(&surf, &cr, TRUE, FALSE); |
2383 | _compute_full_mask_path(cr, |
2384 | anchor_width, |
2385 | anchor_height, |
2386 | @@ -405,20 +405,19 @@ |
2387 | corner_radius, |
2388 | padding_size); |
2389 | |
2390 | - _draw(cr, TRUE, line_width, rgba_shadow, FALSE, FALSE); |
2391 | + _draw(cr, TRUE, line_width, shadow_color, FALSE, FALSE); |
2392 | nux::CairoGraphics dummy(CAIRO_FORMAT_A1, 1, 1); |
2393 | dummy.BlurSurface(blur_coeff, surf); |
2394 | compute_mask(cr); |
2395 | - compute_outline(cr, line_width, rgba_line); |
2396 | + compute_outline(cr, line_width, line_color); |
2397 | } |
2398 | |
2399 | void compute_full_mask( |
2400 | cairo_t* cr, |
2401 | cairo_surface_t* surf, |
2402 | - gint width, |
2403 | - gint height, |
2404 | + gfloat width, |
2405 | + gfloat height, |
2406 | gfloat radius, |
2407 | - guint shadow_radius, |
2408 | gfloat anchor_width, |
2409 | gfloat anchor_height, |
2410 | gint upper_size, |
2411 | @@ -426,9 +425,9 @@ |
2412 | gboolean outline, |
2413 | gfloat line_width, |
2414 | gint padding_size, |
2415 | - gfloat* rgba) |
2416 | + nux::Color const& color) |
2417 | { |
2418 | - _setup(&surf, &cr, outline, width, height, negative); |
2419 | + _setup(&surf, &cr, outline, negative); |
2420 | _compute_full_mask_path(cr, |
2421 | anchor_width, |
2422 | anchor_height, |
2423 | @@ -437,7 +436,7 @@ |
2424 | upper_size, |
2425 | radius, |
2426 | padding_size); |
2427 | - _finalize(&cr, outline, line_width, rgba, negative, outline); |
2428 | + _finalize(&cr, outline, line_width, color, negative, outline); |
2429 | } |
2430 | |
2431 | void Tooltip::UpdateTexture() |
2432 | @@ -451,7 +450,9 @@ |
2433 | int x = _anchorX - PADDING.CP(cv_); |
2434 | int y = _anchorY - height / 2; |
2435 | |
2436 | - float blur_coef = 6.0f; |
2437 | + auto const& deco_style = decoration::Style::Get(); |
2438 | + float dpi_scale = cv_->DPIScale(); |
2439 | + float blur_coef = std::round(deco_style->ActiveShadowRadius() * dpi_scale / 2.0f); |
2440 | |
2441 | SetBaseX(x); |
2442 | SetBaseY(y); |
2443 | @@ -460,30 +461,32 @@ |
2444 | nux::CairoGraphics cairo_mask(CAIRO_FORMAT_ARGB32, width, height); |
2445 | nux::CairoGraphics cairo_outline(CAIRO_FORMAT_ARGB32, width, height); |
2446 | |
2447 | - cairo_t* cr_bg = cairo_bg.GetContext(); |
2448 | - cairo_t* cr_mask = cairo_mask.GetContext(); |
2449 | - cairo_t* cr_outline = cairo_outline.GetContext(); |
2450 | - |
2451 | - float tint_color[4] = {0.074f, 0.074f, 0.074f, 0.80f}; |
2452 | - float hl_color[4] = {1.0f, 1.0f, 1.0f, 0.8f}; |
2453 | - float dot_color[4] = {1.0f, 1.0f, 1.0f, 0.20f}; |
2454 | - float shadow_color[4] = {0.0f, 0.0f, 0.0f, 1.00f}; |
2455 | - float outline_color[4] = {1.0f, 1.0f, 1.0f, 0.15f}; |
2456 | - float mask_color[4] = {1.0f, 1.0f, 1.0f, 1.00f}; |
2457 | + cairo_surface_set_device_scale(cairo_bg.GetSurface(), dpi_scale, dpi_scale); |
2458 | + cairo_surface_set_device_scale(cairo_mask.GetSurface(), dpi_scale, dpi_scale); |
2459 | + cairo_surface_set_device_scale(cairo_outline.GetSurface(), dpi_scale, dpi_scale); |
2460 | + |
2461 | + cairo_t* cr_bg = cairo_bg.GetInternalContext(); |
2462 | + cairo_t* cr_mask = cairo_mask.GetInternalContext(); |
2463 | + cairo_t* cr_outline = cairo_outline.GetInternalContext(); |
2464 | + |
2465 | + nux::Color tint_color(0.074f, 0.074f, 0.074f, 0.80f); |
2466 | + nux::Color hl_color(1.0f, 1.0f, 1.0f, 0.8f); |
2467 | + nux::Color dot_color(1.0f, 1.0f, 1.0f, 0.20f); |
2468 | + nux::Color shadow_color(deco_style->ActiveShadowColor()); |
2469 | + nux::Color outline_color(1.0f, 1.0f, 1.0f, 0.15f); |
2470 | + nux::Color mask_color(1.0f, 1.0f, 1.0f, 1.00f); |
2471 | |
2472 | if (!HasBlurredBackground()) |
2473 | { |
2474 | //If low gfx is detected then disable transparency because we're not bluring using our blur anymore. |
2475 | - const float alpha_value = 1.0f; |
2476 | - |
2477 | - tint_color[3] = alpha_value; |
2478 | - hl_color[3] = alpha_value; |
2479 | - dot_color[3] = alpha_value; |
2480 | + tint_color.alpha = 1.0f; |
2481 | + hl_color.alpha = 1.0f; |
2482 | + dot_color.alpha = 1.0f; |
2483 | } |
2484 | |
2485 | tint_dot_hl(cr_bg, |
2486 | - width, |
2487 | - height, |
2488 | + width / dpi_scale, |
2489 | + height / dpi_scale, |
2490 | width / 2.0f, |
2491 | 0, |
2492 | nux::Max<float>(width / 1.3f, height / 1.3f), |
2493 | @@ -495,38 +498,33 @@ |
2494 | ( |
2495 | cr_outline, |
2496 | cairo_outline.GetSurface(), |
2497 | - width, |
2498 | - height, |
2499 | - ANCHOR_WIDTH.CP(cv_), |
2500 | - ANCHOR_HEIGHT.CP(cv_), |
2501 | + width / dpi_scale, |
2502 | + height / dpi_scale, |
2503 | + ANCHOR_WIDTH, |
2504 | + ANCHOR_HEIGHT, |
2505 | -1, |
2506 | - CORNER_RADIUS.CP(cv_), |
2507 | + CORNER_RADIUS, |
2508 | blur_coef, |
2509 | shadow_color, |
2510 | 1.0f, |
2511 | - PADDING.CP(cv_), |
2512 | + PADDING, |
2513 | outline_color); |
2514 | |
2515 | compute_full_mask( |
2516 | cr_mask, |
2517 | cairo_mask.GetSurface(), |
2518 | - width, |
2519 | - height, |
2520 | - CORNER_RADIUS.CP(cv_), // radius, |
2521 | - RawPixel(16).CP(cv_), // shadow_radius, |
2522 | - ANCHOR_WIDTH.CP(cv_), // anchor_width, |
2523 | - ANCHOR_HEIGHT.CP(cv_), // anchor_height, |
2524 | + width / dpi_scale, |
2525 | + height / dpi_scale, |
2526 | + CORNER_RADIUS, // radius, |
2527 | + ANCHOR_WIDTH, // anchor_width, |
2528 | + ANCHOR_HEIGHT, // anchor_height, |
2529 | -1, // upper_size, |
2530 | true, // negative, |
2531 | false, // outline, |
2532 | 1.0, // line_width, |
2533 | - PADDING.CP(cv_), // padding_size, |
2534 | + PADDING, // padding_size, |
2535 | mask_color); |
2536 | |
2537 | - cairo_destroy(cr_bg); |
2538 | - cairo_destroy(cr_outline); |
2539 | - cairo_destroy(cr_mask); |
2540 | - |
2541 | texture_bg_ = texture_ptr_from_cairo_graphics(cairo_bg); |
2542 | texture_mask_ = texture_ptr_from_cairo_graphics(cairo_mask); |
2543 | texture_outline_ = texture_ptr_from_cairo_graphics(cairo_outline); |
2544 | |
2545 | === modified file 'launcher/XdndCollectionWindowImp.cpp' |
2546 | --- launcher/XdndCollectionWindowImp.cpp 2013-10-29 22:33:02 +0000 |
2547 | +++ launcher/XdndCollectionWindowImp.cpp 2014-03-03 11:01:22 +0000 |
2548 | @@ -55,7 +55,7 @@ |
2549 | WindowManager::Default().window_moved.connect(sigc::mem_fun(this, &PrivateWindow::OnWindowMoved)); |
2550 | } |
2551 | |
2552 | - void OnScreenChanged(int /*primary*/, std::vector<nux::Geometry>& /*monitors*/) |
2553 | + void OnScreenChanged(int /*primary*/, std::vector<nux::Geometry> const& /*monitors*/) |
2554 | { |
2555 | auto uscreen = UScreen::GetDefault(); |
2556 | SetGeometry(uscreen->GetScreenGeometry()); |
2557 | |
2558 | === modified file 'launcher/XdndManagerImp.cpp' |
2559 | --- launcher/XdndManagerImp.cpp 2013-10-14 15:59:22 +0000 |
2560 | +++ launcher/XdndManagerImp.cpp 2014-03-03 11:01:22 +0000 |
2561 | @@ -19,6 +19,7 @@ |
2562 | |
2563 | #include "XdndManagerImp.h" |
2564 | |
2565 | +#include <algorithm> |
2566 | #include "unity-shared/UScreen.h" |
2567 | |
2568 | namespace unity { |
2569 | |
2570 | === modified file 'panel/PanelController.cpp' |
2571 | --- panel/PanelController.cpp 2014-02-18 20:11:54 +0000 |
2572 | +++ panel/PanelController.cpp 2014-03-03 11:01:22 +0000 |
2573 | @@ -38,7 +38,7 @@ |
2574 | class Controller::Impl |
2575 | { |
2576 | public: |
2577 | - Impl(menu::Manager::Ptr const&, ui::EdgeBarrierController::Ptr const&); |
2578 | + Impl(Controller*, menu::Manager::Ptr const&, ui::EdgeBarrierController::Ptr const&); |
2579 | ~Impl(); |
2580 | |
2581 | // NOTE: nux::Property maybe? |
2582 | @@ -48,14 +48,15 @@ |
2583 | |
2584 | float opacity() const; |
2585 | |
2586 | - nux::ObjectPtr<PanelView> CreatePanel(Introspectable *iobj); |
2587 | - void OnScreenChanged(unsigned int primary_monitor, std::vector<nux::Geometry>& monitors, Introspectable *iobj); |
2588 | + nux::ObjectPtr<PanelView> CreatePanel(); |
2589 | + void OnScreenChanged(unsigned int primary_monitor, std::vector<nux::Geometry> const& monitors); |
2590 | void UpdatePanelGeometries(); |
2591 | |
2592 | typedef nux::ObjectPtr<nux::BaseWindow> BaseWindowPtr; |
2593 | |
2594 | PanelView* ViewForWindow(BaseWindowPtr const& window) const; |
2595 | |
2596 | + Controller* parent_; |
2597 | menu::Manager::Ptr indicators_; |
2598 | ui::EdgeBarrierController::Ptr edge_barriers_; |
2599 | PanelVector panels_; |
2600 | @@ -66,12 +67,17 @@ |
2601 | }; |
2602 | |
2603 | |
2604 | -Controller::Impl::Impl(menu::Manager::Ptr const& indicators, ui::EdgeBarrierController::Ptr const& edge_barriers) |
2605 | - : indicators_(indicators) |
2606 | +Controller::Impl::Impl(Controller* parent, menu::Manager::Ptr const& indicators, ui::EdgeBarrierController::Ptr const& edge_barriers) |
2607 | + : parent_(parent) |
2608 | + , indicators_(indicators) |
2609 | , edge_barriers_(edge_barriers) |
2610 | , opacity_(1.0f) |
2611 | , opacity_maximized_toggle_(false) |
2612 | -{} |
2613 | +{ |
2614 | + UScreen* screen = UScreen::GetDefault(); |
2615 | + screen->changed.connect(sigc::mem_fun(this, &Impl::OnScreenChanged)); |
2616 | + OnScreenChanged(screen->GetPrimaryMonitor(), screen->GetMonitors()); |
2617 | +} |
2618 | |
2619 | Controller::Impl::~Impl() |
2620 | { |
2621 | @@ -132,9 +138,7 @@ |
2622 | } |
2623 | |
2624 | // We need to put a panel on every monitor, and try and re-use the panels we already have |
2625 | -void Controller::Impl::OnScreenChanged(unsigned int primary_monitor, |
2626 | - std::vector<nux::Geometry>& monitors, |
2627 | - Introspectable *iobj) |
2628 | +void Controller::Impl::OnScreenChanged(unsigned int primary_monitor, std::vector<nux::Geometry> const& monitors) |
2629 | { |
2630 | unsigned int num_monitors = monitors.size(); |
2631 | unsigned int num_panels = num_monitors; |
2632 | @@ -147,11 +151,11 @@ |
2633 | { |
2634 | if (i >= panels_size) |
2635 | { |
2636 | - panels_.push_back(CreatePanel(iobj)); |
2637 | + panels_.push_back(CreatePanel()); |
2638 | } |
2639 | else if (!panels_[i]) |
2640 | { |
2641 | - panels_[i] = CreatePanel(iobj); |
2642 | + panels_[i] = CreatePanel(); |
2643 | } |
2644 | |
2645 | if (panels_[i]->GetMonitor() != static_cast<int>(i)) |
2646 | @@ -171,7 +175,7 @@ |
2647 | auto const& panel = panels_[i]; |
2648 | if (panel) |
2649 | { |
2650 | - iobj->RemoveChild(panel.GetPointer()); |
2651 | + parent_->RemoveChild(panel.GetPointer()); |
2652 | panel->GetParent()->UnReference(); |
2653 | edge_barriers_->RemoveHorizontalSubscriber(panel.GetPointer(), panel->GetMonitor()); |
2654 | } |
2655 | @@ -182,7 +186,7 @@ |
2656 | } |
2657 | |
2658 | |
2659 | -nux::ObjectPtr<PanelView> Controller::Impl::CreatePanel(Introspectable *iobj) |
2660 | +nux::ObjectPtr<PanelView> Controller::Impl::CreatePanel() |
2661 | { |
2662 | auto* panel_window = new MockableBaseWindow(TEXT("PanelWindow")); |
2663 | |
2664 | @@ -205,7 +209,7 @@ |
2665 | panel_window->EnableInputWindow(true, panel::window_title, false, false); |
2666 | |
2667 | panel_window->InputWindowEnableStruts(true); |
2668 | - iobj->AddChild(view); |
2669 | + parent_->AddChild(view); |
2670 | |
2671 | return nux::ObjectPtr<PanelView>(view); |
2672 | } |
2673 | @@ -228,14 +232,8 @@ |
2674 | |
2675 | Controller::Controller(menu::Manager::Ptr const& menus, ui::EdgeBarrierController::Ptr const& edge_barriers) |
2676 | : launcher_width(64) |
2677 | - , pimpl(new Impl(menus, edge_barriers)) |
2678 | + , pimpl(new Impl(this, menus, edge_barriers)) |
2679 | { |
2680 | - UScreen* screen = UScreen::GetDefault(); |
2681 | - screen->changed.connect(sigc::mem_fun(this, &Controller::OnScreenChanged)); |
2682 | - OnScreenChanged(screen->GetPrimaryMonitor(), screen->GetMonitors()); |
2683 | - |
2684 | - unity::Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &Controller::OnDPIChanged)); |
2685 | - |
2686 | launcher_width.changed.connect([this] (int width) |
2687 | { |
2688 | pimpl->SetLauncherWidth(width); |
2689 | @@ -245,19 +243,6 @@ |
2690 | Controller::~Controller() |
2691 | {} |
2692 | |
2693 | -void Controller::OnDPIChanged() |
2694 | -{ |
2695 | - for (auto& panel_ptr : pimpl->panels_) |
2696 | - { |
2697 | - if (panel_ptr) |
2698 | - { |
2699 | - int monitor = panel_ptr->GetMonitor(); |
2700 | - |
2701 | - panel_ptr->SetMonitor(monitor); |
2702 | - } |
2703 | - } |
2704 | -} |
2705 | - |
2706 | void Controller::SetOpacity(float opacity) |
2707 | { |
2708 | pimpl->SetOpacity(opacity); |
2709 | @@ -299,10 +284,5 @@ |
2710 | .add("opacity", pimpl->opacity()); |
2711 | } |
2712 | |
2713 | -void Controller::OnScreenChanged(int primary_monitor, std::vector<nux::Geometry>& monitors) |
2714 | -{ |
2715 | - pimpl->OnScreenChanged(primary_monitor, monitors, this); |
2716 | -} |
2717 | - |
2718 | } // namespace panel |
2719 | } // namespace unity |
2720 | |
2721 | === modified file 'panel/PanelController.h' |
2722 | --- panel/PanelController.h 2014-02-18 18:27:30 +0000 |
2723 | +++ panel/PanelController.h 2014-03-03 11:01:22 +0000 |
2724 | @@ -61,9 +61,6 @@ |
2725 | void AddProperties(debug::IntrospectionData&); |
2726 | |
2727 | private: |
2728 | - void OnScreenChanged(int primary_monitor, std::vector<nux::Geometry>& monitors); |
2729 | - void OnDPIChanged(); |
2730 | - |
2731 | class Impl; |
2732 | std::unique_ptr<Impl> pimpl; |
2733 | }; |
2734 | |
2735 | === modified file 'panel/PanelIndicatorEntryDropdownView.cpp' |
2736 | --- panel/PanelIndicatorEntryDropdownView.cpp 2014-02-18 21:20:28 +0000 |
2737 | +++ panel/PanelIndicatorEntryDropdownView.cpp 2014-03-03 11:01:22 +0000 |
2738 | @@ -144,7 +144,7 @@ |
2739 | entries.push_back(entry->GetEntry()); |
2740 | |
2741 | auto const& geo = GetAbsoluteGeometry(); |
2742 | - indicators_->ShowEntriesDropdown(entries, active_entry_, 0, geo.x, geo.y + Style::Instance().PanelHeight(monitor_)); |
2743 | + indicators_->ShowEntriesDropdown(entries, active_entry_, 0, geo.x, geo.y + geo.height); |
2744 | } |
2745 | |
2746 | bool PanelIndicatorEntryDropdownView::ActivateChild(PanelIndicatorEntryView::Ptr const& child) |
2747 | |
2748 | === modified file 'panel/PanelIndicatorEntryView.cpp' |
2749 | --- panel/PanelIndicatorEntryView.cpp 2014-02-19 02:16:22 +0000 |
2750 | +++ panel/PanelIndicatorEntryView.cpp 2014-03-03 11:01:22 +0000 |
2751 | @@ -19,6 +19,7 @@ |
2752 | */ |
2753 | |
2754 | #include <Nux/Nux.h> |
2755 | +#include <NuxCore/Logger.h> |
2756 | #include <UnityCore/ConnectionManager.h> |
2757 | #include <UnityCore/GTKWrapper.h> |
2758 | |
2759 | @@ -29,17 +30,16 @@ |
2760 | |
2761 | #include "unity-shared/CairoTexture.h" |
2762 | #include "unity-shared/PanelStyle.h" |
2763 | +#include "unity-shared/RawPixel.h" |
2764 | #include "unity-shared/WindowManager.h" |
2765 | #include "unity-shared/UnitySettings.h" |
2766 | |
2767 | namespace unity |
2768 | { |
2769 | - |
2770 | namespace |
2771 | { |
2772 | -const RawPixel DEFAULT_SPACING = 3_em; |
2773 | - |
2774 | -const int SCALED_IMAGE_Y = 1; |
2775 | +DECLARE_LOGGER(logger, "unity.panel.indicator.entry"); |
2776 | +const int DEFAULT_SPACING = 3; |
2777 | } |
2778 | |
2779 | using namespace indicator; |
2780 | @@ -48,17 +48,14 @@ |
2781 | IndicatorEntryType type) |
2782 | : TextureArea(NUX_TRACKER_LOCATION) |
2783 | , proxy_(proxy) |
2784 | - , spacing_(DEFAULT_SPACING) |
2785 | - , left_padding_(padding < 0 ? 0 : padding) |
2786 | - , right_padding_(left_padding_) |
2787 | + , type_(type) |
2788 | , monitor_(0) |
2789 | - , type_(type) |
2790 | - , entry_texture_(nullptr) |
2791 | , opacity_(1.0f) |
2792 | , draw_active_(false) |
2793 | , overlay_showing_(false) |
2794 | , disabled_(false) |
2795 | , focused_(true) |
2796 | + , padding_(padding < 0 ? 0 : padding) |
2797 | , cv_(unity::Settings::Instance().em(monitor_)) |
2798 | { |
2799 | proxy_->active_changed.connect(sigc::mem_fun(this, &PanelIndicatorEntryView::OnActiveChanged)); |
2800 | @@ -73,6 +70,14 @@ |
2801 | InputArea::mouse_wheel.connect(sigc::mem_fun(this, &PanelIndicatorEntryView::OnMouseWheel)); |
2802 | } |
2803 | |
2804 | + if (type_ != MENU) |
2805 | + { |
2806 | + icon_theme_changed_.Connect(gtk_icon_theme_get_default(), "changed", [this] (GtkIconTheme*) { |
2807 | + if (proxy_->image_type() && proxy_->image_visible()) |
2808 | + Refresh(); |
2809 | + }); |
2810 | + } |
2811 | + |
2812 | panel::Style::Instance().changed.connect(sigc::mem_fun(this, &PanelIndicatorEntryView::Refresh)); |
2813 | unity::Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &PanelIndicatorEntryView::Refresh)); |
2814 | |
2815 | @@ -115,7 +120,7 @@ |
2816 | wm.TerminateScale(); |
2817 | |
2818 | auto const& abs_geo = GetAbsoluteGeometry(); |
2819 | - proxy_->ShowMenu(abs_geo.x, abs_geo.y + panel::Style::Instance().PanelHeight(monitor_), button); |
2820 | + proxy_->ShowMenu(abs_geo.x, abs_geo.y + abs_geo.height, button); |
2821 | } |
2822 | |
2823 | void PanelIndicatorEntryView::OnMouseDown(int x, int y, long button_flags, long key_flags) |
2824 | @@ -194,73 +199,59 @@ |
2825 | } |
2826 | } |
2827 | |
2828 | -glib::Object<GdkPixbuf> PanelIndicatorEntryView::MakePixbuf() |
2829 | +glib::Object<GdkPixbuf> PanelIndicatorEntryView::MakePixbuf(int size) |
2830 | { |
2831 | glib::Object<GdkPixbuf> pixbuf; |
2832 | - GtkIconTheme* theme = gtk_icon_theme_get_default(); |
2833 | - int image_type = proxy_->image_type(); |
2834 | - RawPixel size = (type_ != DROP_DOWN) ? 24_em : 10_em; |
2835 | - |
2836 | - if (image_type == GTK_IMAGE_PIXBUF) |
2837 | - { |
2838 | - gsize len = 0; |
2839 | - guchar* decoded = g_base64_decode(proxy_->image_data().c_str(), &len); |
2840 | - |
2841 | - glib::Object<GInputStream> stream(g_memory_input_stream_new_from_data(decoded, |
2842 | - len, |
2843 | - nullptr)); |
2844 | - |
2845 | - pixbuf = gdk_pixbuf_new_from_stream(stream, nullptr, nullptr); |
2846 | - |
2847 | - g_free(decoded); |
2848 | - g_input_stream_close(stream, nullptr, nullptr); |
2849 | - } |
2850 | - else if (image_type == GTK_IMAGE_STOCK || |
2851 | - image_type == GTK_IMAGE_ICON_NAME) |
2852 | - { |
2853 | - pixbuf = gtk_icon_theme_load_icon(theme, proxy_->image_data().c_str(), size.CP(cv_), |
2854 | - (GtkIconLookupFlags)0, nullptr); |
2855 | - } |
2856 | - else if (image_type == GTK_IMAGE_GICON) |
2857 | - { |
2858 | - glib::Object<GIcon> icon(g_icon_new_for_string(proxy_->image_data().c_str(), nullptr)); |
2859 | - |
2860 | - gtk::IconInfo info(gtk_icon_theme_lookup_by_gicon(theme, icon, size.CP(cv_), |
2861 | - (GtkIconLookupFlags)0)); |
2862 | - if (info) |
2863 | - pixbuf = gtk_icon_info_load_icon(info, nullptr); |
2864 | + auto image_type = proxy_->image_type(); |
2865 | + |
2866 | + switch (image_type) |
2867 | + { |
2868 | + case GTK_IMAGE_PIXBUF: |
2869 | + { |
2870 | + gsize len = 0; |
2871 | + auto* decoded = g_base64_decode(proxy_->image_data().c_str(), &len); |
2872 | + glib::Object<GInputStream> stream(g_memory_input_stream_new_from_data(decoded, len, nullptr)); |
2873 | + pixbuf = gdk_pixbuf_new_from_stream(stream, nullptr, nullptr); |
2874 | + g_input_stream_close(stream, nullptr, nullptr); |
2875 | + g_free(decoded); |
2876 | + break; |
2877 | + } |
2878 | + |
2879 | + case GTK_IMAGE_ICON_NAME: |
2880 | + case GTK_IMAGE_STOCK: |
2881 | + case GTK_IMAGE_GICON: |
2882 | + { |
2883 | + GtkIconTheme* theme = gtk_icon_theme_get_default(); |
2884 | + auto flags = static_cast<GtkIconLookupFlags>(0); |
2885 | + gtk::IconInfo info; |
2886 | + |
2887 | + if (image_type == GTK_IMAGE_GICON) |
2888 | + { |
2889 | + glib::Object<GIcon> icon(g_icon_new_for_string(proxy_->image_data().c_str(), nullptr)); |
2890 | + info = gtk_icon_theme_lookup_by_gicon(theme, icon, size, flags); |
2891 | + } |
2892 | + else |
2893 | + { |
2894 | + info = gtk_icon_theme_lookup_icon(theme, proxy_->image_data().c_str(), size, flags); |
2895 | + } |
2896 | + |
2897 | + if (info) |
2898 | + { |
2899 | + auto* filename = gtk_icon_info_get_filename(info); |
2900 | + pixbuf = gdk_pixbuf_new_from_file_at_size(filename, -1, size, nullptr); |
2901 | + } |
2902 | + else if (image_type == GTK_IMAGE_ICON_NAME) |
2903 | + { |
2904 | + pixbuf = gdk_pixbuf_new_from_file_at_size(proxy_->image_data().c_str(), -1, size, nullptr); |
2905 | + } |
2906 | + |
2907 | + break; |
2908 | + } |
2909 | } |
2910 | |
2911 | return pixbuf; |
2912 | } |
2913 | |
2914 | -int PanelIndicatorEntryView::PixbufWidth(glib::Object<GdkPixbuf> const& pixbuf) const |
2915 | -{ |
2916 | - int image_type = proxy_->image_type(); |
2917 | - if (image_type == GTK_IMAGE_PIXBUF) |
2918 | - { |
2919 | - return RawPixel(gdk_pixbuf_get_width(pixbuf)).CP(cv_); |
2920 | - } |
2921 | - else |
2922 | - { |
2923 | - return gdk_pixbuf_get_width(pixbuf); |
2924 | - } |
2925 | -} |
2926 | - |
2927 | -int PanelIndicatorEntryView::PixbufHeight(glib::Object<GdkPixbuf> const& pixbuf) const |
2928 | -{ |
2929 | - int image_type = proxy_->image_type(); |
2930 | - if (image_type == GTK_IMAGE_PIXBUF) |
2931 | - { |
2932 | - return RawPixel(gdk_pixbuf_get_height(pixbuf)).CP(cv_); |
2933 | - } |
2934 | - else |
2935 | - { |
2936 | - return gdk_pixbuf_get_height(pixbuf); |
2937 | - } |
2938 | - |
2939 | -} |
2940 | - |
2941 | void PanelIndicatorEntryView::DrawEntryPrelight(cairo_t* cr, unsigned int width, unsigned int height) |
2942 | { |
2943 | GtkStyleContext* style_context = panel::Style::Instance().GetStyleContext(); |
2944 | @@ -285,22 +276,9 @@ |
2945 | gtk_style_context_restore(style_context); |
2946 | } |
2947 | |
2948 | -// FIXME Remove me when icons for the indicators aren't stuck as 22x22 images... |
2949 | -void PanelIndicatorEntryView::ScaleImageIcons(cairo_t* cr, int* x, int* y) |
2950 | -{ |
2951 | - int image_type = proxy_->image_type(); |
2952 | - if (image_type == GTK_IMAGE_PIXBUF) |
2953 | - { |
2954 | - float aspect = cv_->DPIScale(); |
2955 | - *x = left_padding_; |
2956 | - *y = SCALED_IMAGE_Y; |
2957 | - cairo_scale(cr, aspect, aspect); |
2958 | - } |
2959 | -} |
2960 | - |
2961 | -void PanelIndicatorEntryView::DrawEntryContent(cairo_t *cr, unsigned int width, unsigned int height, glib::Object<GdkPixbuf> const& pixbuf, glib::Object<PangoLayout> const& layout) |
2962 | -{ |
2963 | - int x = left_padding_.CP(cv_); |
2964 | +void PanelIndicatorEntryView::DrawEntryContent(cairo_t *cr, unsigned int width, unsigned int height, glib::Object<GdkPixbuf> const& pixbuf, bool icon_scalable, glib::Object<PangoLayout> const& layout) |
2965 | +{ |
2966 | + int x = padding_; |
2967 | |
2968 | if (IsActive()) |
2969 | DrawEntryPrelight(cr, width, height); |
2970 | @@ -308,7 +286,7 @@ |
2971 | if (pixbuf && IsIconVisible()) |
2972 | { |
2973 | GtkStyleContext* style_context = panel::Style::Instance().GetStyleContext(); |
2974 | - unsigned int icon_width = PixbufWidth(pixbuf); |
2975 | + unsigned int icon_width = gdk_pixbuf_get_width(pixbuf); |
2976 | |
2977 | gtk_style_context_save(style_context); |
2978 | |
2979 | @@ -330,7 +308,17 @@ |
2980 | gtk_style_context_set_state(style_context, GTK_STATE_FLAG_PRELIGHT); |
2981 | } |
2982 | |
2983 | - int y = (int)((height - PixbufHeight(pixbuf)) / 2); |
2984 | + int y = (height - gdk_pixbuf_get_height(pixbuf)) / 2; |
2985 | + |
2986 | + if (icon_scalable) |
2987 | + { |
2988 | + double dpi_scale = cv_->DPIScale(); |
2989 | + cairo_save(cr); |
2990 | + cairo_scale(cr, 1.0f/dpi_scale, 1.0f/dpi_scale); |
2991 | + x = padding_ * dpi_scale; |
2992 | + y = (std::ceil(height * dpi_scale) - gdk_pixbuf_get_height(pixbuf)) / 2; |
2993 | + icon_width /= dpi_scale; |
2994 | + } |
2995 | |
2996 | if (overlay_showing_ && !IsActive()) |
2997 | { |
2998 | @@ -339,9 +327,6 @@ |
2999 | * a white square. It works surprisingly well for most symbolic-type |
3000 | * icon themes/icons. |
3001 | */ |
3002 | - cairo_save(cr); |
3003 | - ScaleImageIcons(cr, &x, &y); |
3004 | - |
3005 | cairo_push_group(cr); |
3006 | gdk_cairo_set_source_pixbuf(cr, pixbuf, x, y); |
3007 | cairo_paint_with_alpha(cr, (IsIconSensitive() && IsFocused()) ? 1.0 : 0.5); |
3008 | @@ -353,36 +338,29 @@ |
3009 | cairo_mask(cr, pat); |
3010 | |
3011 | cairo_pattern_destroy(pat); |
3012 | - cairo_restore(cr); |
3013 | } |
3014 | else |
3015 | { |
3016 | - cairo_save(cr); |
3017 | - ScaleImageIcons(cr, &x, &y); |
3018 | - |
3019 | cairo_push_group(cr); |
3020 | gtk_render_icon(style_context, cr, pixbuf, x, y); |
3021 | cairo_pop_group_to_source(cr); |
3022 | cairo_paint_with_alpha(cr, (IsIconSensitive() && IsFocused()) ? 1.0 : 0.5); |
3023 | - |
3024 | - cairo_restore(cr); |
3025 | } |
3026 | |
3027 | gtk_widget_path_free(widget_path); |
3028 | - |
3029 | gtk_style_context_restore(style_context); |
3030 | |
3031 | - x += icon_width + spacing_.CP(cv_); |
3032 | + if (icon_scalable) |
3033 | + { |
3034 | + cairo_restore(cr); |
3035 | + x = padding_; |
3036 | + } |
3037 | + |
3038 | + x += icon_width + DEFAULT_SPACING; |
3039 | } |
3040 | |
3041 | if (layout) |
3042 | { |
3043 | - PangoRectangle log_rect; |
3044 | - pango_layout_get_extents(layout, nullptr, &log_rect); |
3045 | - unsigned int text_height = log_rect.height / PANGO_SCALE; |
3046 | - |
3047 | - pango_cairo_update_layout(cr, layout); |
3048 | - |
3049 | GtkStyleContext* style_context = panel::Style::Instance().GetStyleContext(); |
3050 | |
3051 | gtk_style_context_save(style_context); |
3052 | @@ -405,7 +383,9 @@ |
3053 | gtk_style_context_set_state(style_context, GTK_STATE_FLAG_PRELIGHT); |
3054 | } |
3055 | |
3056 | - int y = (height - text_height) / 2; |
3057 | + nux::Size extents; |
3058 | + pango_layout_get_pixel_size(layout, &extents.width, &extents.height); |
3059 | + int y = (height - extents.height) / 2; |
3060 | |
3061 | if (overlay_showing_) |
3062 | { |
3063 | @@ -446,88 +426,79 @@ |
3064 | cairo_t* cr; |
3065 | |
3066 | std::string label = GetLabel(); |
3067 | - glib::Object<GdkPixbuf> const& pixbuf = MakePixbuf(); |
3068 | - |
3069 | - unsigned int width = 0; |
3070 | - unsigned int icon_width = 0; |
3071 | - unsigned int height = panel::Style::Instance().PanelHeight(monitor_); |
3072 | + auto& panel_style = panel::Style::Instance(); |
3073 | + |
3074 | + double dpi_scale = cv_->DPIScale(); |
3075 | + int width = 0; |
3076 | + int height = panel_style.PanelHeight(monitor_) / dpi_scale; |
3077 | + int icon_width = 0; |
3078 | + |
3079 | + int icon_size = RawPixel((type_ != DROP_DOWN) ? 22 : 10).CP(dpi_scale); |
3080 | + glib::Object<GdkPixbuf> const& pixbuf = MakePixbuf(icon_size); |
3081 | + bool icon_scalable = false; |
3082 | |
3083 | // First lets figure out our size |
3084 | if (pixbuf && IsIconVisible()) |
3085 | { |
3086 | - width = PixbufWidth(pixbuf); |
3087 | + width = gdk_pixbuf_get_width(pixbuf); |
3088 | + |
3089 | + if (gdk_pixbuf_get_height(pixbuf) == icon_size) |
3090 | + { |
3091 | + icon_scalable = true; |
3092 | + width /= dpi_scale; |
3093 | + } |
3094 | + |
3095 | icon_width = width; |
3096 | } |
3097 | |
3098 | if (!label.empty() && IsLabelVisible()) |
3099 | { |
3100 | - using namespace panel; |
3101 | - PangoContext* cxt; |
3102 | PangoAttrList* attrs = nullptr; |
3103 | - PangoRectangle log_rect; |
3104 | - GdkScreen* screen = gdk_screen_get_default(); |
3105 | - PangoFontDescription* desc = nullptr; |
3106 | - PanelItem panel_item = (type_ == MENU) ? PanelItem::MENU : PanelItem::INDICATOR; |
3107 | - |
3108 | - Style& panel_style = Style::Instance(); |
3109 | - std::string const& font_description = panel_style.GetFontDescription(panel_item); |
3110 | - int dpi = panel_style.GetTextDPI(); |
3111 | + auto panel_item = (type_ == MENU) ? panel::PanelItem::MENU : panel::PanelItem::INDICATOR; |
3112 | + std::string const& font = panel_style.GetFontDescription(panel_item); |
3113 | |
3114 | if (proxy_->show_now()) |
3115 | { |
3116 | if (!pango_parse_markup(label.c_str(), -1, '_', &attrs, nullptr, nullptr, nullptr)) |
3117 | { |
3118 | - g_debug("pango_parse_markup failed"); |
3119 | + LOG_WARN(logger) << "Pango markup parsing failed"; |
3120 | } |
3121 | } |
3122 | |
3123 | - desc = pango_font_description_from_string(font_description.c_str()); |
3124 | - pango_font_description_set_weight(desc, PANGO_WEIGHT_NORMAL); |
3125 | - |
3126 | - nux::CairoGraphics cairo_graphics(CAIRO_FORMAT_ARGB32, 1, 1); |
3127 | - cr = cairo_graphics.GetInternalContext(); |
3128 | - |
3129 | - layout = pango_cairo_create_layout(cr); |
3130 | - if (attrs) |
3131 | - { |
3132 | - pango_layout_set_attributes(layout, attrs); |
3133 | - pango_attr_list_unref(attrs); |
3134 | - } |
3135 | - |
3136 | - pango_layout_set_font_description(layout, desc); |
3137 | + glib::Object<PangoContext> context(gdk_pango_context_get_for_screen(gdk_screen_get_default())); |
3138 | + std::shared_ptr<PangoFontDescription> desc(pango_font_description_from_string(font.c_str()), pango_font_description_free); |
3139 | + pango_context_set_font_description(context, desc.get()); |
3140 | + pango_context_set_language(context, gtk_get_default_language()); |
3141 | |
3142 | label.erase(std::remove(label.begin(), label.end(), '_'), label.end()); |
3143 | + layout = pango_layout_new(context); |
3144 | + pango_layout_set_height(layout, -1); //avoid wrap lines |
3145 | pango_layout_set_text(layout, label.c_str(), -1); |
3146 | - |
3147 | - cxt = pango_layout_get_context(layout); |
3148 | - pango_cairo_context_set_font_options(cxt, gdk_screen_get_font_options(screen)); |
3149 | - pango_cairo_context_set_resolution(cxt, dpi / static_cast<float>(PANGO_SCALE)); |
3150 | - pango_layout_context_changed(layout); |
3151 | - |
3152 | - pango_layout_get_extents(layout, nullptr, &log_rect); |
3153 | - unsigned int text_width = log_rect.width / PANGO_SCALE; |
3154 | + pango_layout_set_attributes(layout, attrs); |
3155 | + pango_attr_list_unref(attrs); |
3156 | + |
3157 | + nux::Size extents; |
3158 | + pango_layout_get_pixel_size(layout, &extents.width, &extents.height); |
3159 | |
3160 | if (icon_width) |
3161 | - width += spacing_.CP(cv_); |
3162 | - width += text_width; |
3163 | + width += DEFAULT_SPACING; |
3164 | |
3165 | - pango_font_description_free(desc); |
3166 | + width += extents.width; |
3167 | } |
3168 | |
3169 | if (width) |
3170 | - width += left_padding_.CP(cv_) + right_padding_.CP(cv_); |
3171 | - |
3172 | - SetMinimumWidth(width); |
3173 | - SetMaximumWidth(width); |
3174 | - |
3175 | - nux::CairoGraphics cg(CAIRO_FORMAT_ARGB32, width, height); |
3176 | + width += padding_ * 2; |
3177 | + |
3178 | + SetMinMaxSize(std::ceil(width * dpi_scale), std::ceil(height * dpi_scale)); |
3179 | + nux::CairoGraphics cg(CAIRO_FORMAT_ARGB32, GetWidth(), GetHeight()); |
3180 | + cairo_surface_set_device_scale(cg.GetSurface(), dpi_scale, dpi_scale); |
3181 | cr = cg.GetInternalContext(); |
3182 | cairo_set_line_width(cr, 1); |
3183 | cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); |
3184 | cairo_paint(cr); |
3185 | |
3186 | cairo_set_operator(cr, CAIRO_OPERATOR_OVER); |
3187 | - DrawEntryContent(cr, width, height, pixbuf, layout); |
3188 | + DrawEntryContent(cr, width, height, pixbuf, icon_scalable, layout); |
3189 | |
3190 | entry_texture_ = texture_ptr_from_cairo_graphics(cg); |
3191 | SetTexture(entry_texture_.GetPointer()); |
3192 | @@ -582,9 +553,12 @@ |
3193 | |
3194 | void PanelIndicatorEntryView::SetMonitor(int monitor) |
3195 | { |
3196 | + if (monitor_ == monitor) |
3197 | + return; |
3198 | + |
3199 | monitor_ = monitor; |
3200 | - |
3201 | - cv_ = unity::Settings::Instance().em(monitor); |
3202 | + cv_ = Settings::Instance().em(monitor); |
3203 | + Refresh(); |
3204 | } |
3205 | |
3206 | void PanelIndicatorEntryView::SetOpacity(double opacity) |
3207 | |
3208 | === modified file 'panel/PanelIndicatorEntryView.h' |
3209 | --- panel/PanelIndicatorEntryView.h 2014-02-19 02:16:22 +0000 |
3210 | +++ panel/PanelIndicatorEntryView.h 2014-03-03 11:01:22 +0000 |
3211 | @@ -34,7 +34,6 @@ |
3212 | |
3213 | #include "unity-shared/EMConverter.h" |
3214 | #include "unity-shared/Introspectable.h" |
3215 | -#include "unity-shared/RawPixel.h" |
3216 | |
3217 | |
3218 | namespace unity |
3219 | @@ -102,7 +101,7 @@ |
3220 | virtual void Draw(nux::GraphicsEngine& GfxContext, bool force_draw); |
3221 | virtual void DrawEntryPrelight(cairo_t* cr, unsigned int w, unsigned int h); |
3222 | virtual void DrawEntryContent(cairo_t* cr, unsigned int width, unsigned int height, |
3223 | - glib::Object<GdkPixbuf> const& pixbuf, |
3224 | + glib::Object<GdkPixbuf> const& pixbuf, bool scalable, |
3225 | glib::Object<PangoLayout> const& layout); |
3226 | |
3227 | void Refresh(); |
3228 | @@ -110,11 +109,6 @@ |
3229 | virtual void ShowMenu(int button = 1); |
3230 | |
3231 | indicator::Entry::Ptr proxy_; |
3232 | - RawPixel spacing_; |
3233 | - RawPixel left_padding_; |
3234 | - RawPixel right_padding_; |
3235 | - |
3236 | - int monitor_; |
3237 | |
3238 | private: |
3239 | void OnMouseDown(int x, int y, long button_flags, long key_flags); |
3240 | @@ -122,21 +116,19 @@ |
3241 | void OnMouseWheel(int x, int y, int delta, unsigned long mouse_state, unsigned long key_state); |
3242 | void OnActiveChanged(bool is_active); |
3243 | |
3244 | - int PixbufWidth(glib::Object<GdkPixbuf> const& pixbuf) const; |
3245 | - int PixbufHeight(glib::Object<GdkPixbuf> const& pixbuf) const; |
3246 | - |
3247 | - void ScaleImageIcons(cairo_t* cr, int* x, int* y); |
3248 | - |
3249 | - glib::Object<GdkPixbuf> MakePixbuf(); |
3250 | + glib::Object<GdkPixbuf> MakePixbuf(int size); |
3251 | |
3252 | IndicatorEntryType type_; |
3253 | nux::ObjectPtr<nux::BaseTexture> entry_texture_; |
3254 | nux::Geometry cached_geo_; |
3255 | + glib::Signal<void, GtkIconTheme*> icon_theme_changed_; |
3256 | + int monitor_; |
3257 | double opacity_; |
3258 | bool draw_active_; |
3259 | bool overlay_showing_; |
3260 | bool disabled_; |
3261 | bool focused_; |
3262 | + int padding_; |
3263 | |
3264 | EMConverter::Ptr cv_; |
3265 | }; |
3266 | |
3267 | === modified file 'panel/PanelIndicatorsView.cpp' |
3268 | --- panel/PanelIndicatorsView.cpp 2014-02-19 02:16:22 +0000 |
3269 | +++ panel/PanelIndicatorsView.cpp 2014-03-03 11:01:22 +0000 |
3270 | @@ -381,6 +381,9 @@ |
3271 | void PanelIndicatorsView::SetMonitor(int monitor) |
3272 | { |
3273 | monitor_ = monitor; |
3274 | + |
3275 | + for (auto const& entry : entries_) |
3276 | + entry.second->SetMonitor(monitor_); |
3277 | } |
3278 | |
3279 | bool PanelIndicatorsView::SetOpacity(double& target, double const& new_value) |
3280 | |
3281 | === modified file 'panel/PanelMenuView.cpp' |
3282 | --- panel/PanelMenuView.cpp 2014-02-19 02:16:22 +0000 |
3283 | +++ panel/PanelMenuView.cpp 2014-03-03 11:01:22 +0000 |
3284 | @@ -99,12 +99,13 @@ |
3285 | titlebar_grab_area_->UnParentObject(); |
3286 | } |
3287 | |
3288 | -void PanelMenuView::OnDPIChanged() |
3289 | +void PanelMenuView::OnStyleChanged() |
3290 | { |
3291 | int height = panel::Style::Instance().PanelHeight(monitor_); |
3292 | + window_buttons_->SetMinimumHeight(height); |
3293 | window_buttons_->SetMaximumHeight(height); |
3294 | window_buttons_->UpdateDPIChanged(); |
3295 | - window_buttons_->ComputeContentSize(); |
3296 | + |
3297 | layout_->SetLeftAndRightPadding(window_buttons_->GetContentWidth(), 0); |
3298 | |
3299 | Refresh(true); |
3300 | @@ -126,8 +127,7 @@ |
3301 | mouse_leave.connect(sigc::mem_fun(this, &PanelMenuView::OnPanelViewMouseLeave)); |
3302 | opacity_animator_.updated.connect(sigc::mem_fun(this, &PanelMenuView::OnFadeAnimatorUpdated)); |
3303 | entry_added.connect(sigc::mem_fun(this, &PanelMenuView::OnEntryViewAdded)); |
3304 | - |
3305 | - Style::Instance().changed.connect(sigc::mem_fun(this, &PanelMenuView::OnDPIChanged)); |
3306 | + Style::Instance().changed.connect(sigc::mem_fun(this, &PanelMenuView::OnStyleChanged)); |
3307 | |
3308 | auto const& deco_style = decoration::Style::Get(); |
3309 | lim_changed_connection_ = deco_style->integrated_menus.changed.connect([this] (bool lim) { |
3310 | @@ -167,7 +167,6 @@ |
3311 | { |
3312 | layout_->SetContentDistribution(nux::MAJOR_POSITION_START); |
3313 | layout_->SetLeftAndRightPadding(window_buttons_->GetContentWidth(), 0); |
3314 | - layout_->SetBaseHeight(panel::Style::Instance().PanelHeight(monitor_)); |
3315 | } |
3316 | |
3317 | void PanelMenuView::SetupTitlebarGrabArea() |
3318 | @@ -786,26 +785,28 @@ |
3319 | auto const& style = decoration::Style::Get(); |
3320 | auto text_size = style->TitleNaturalSize(label); |
3321 | auto state = WidgetState::NORMAL; |
3322 | + float dpi_scale = Settings::Instance().em(monitor_)->DPIScale(); |
3323 | |
3324 | if (integrated_menus_ && !is_desktop_focused_ && !WindowManager::Default().IsScaleActive()) |
3325 | { |
3326 | - title_geo_.x = geo.x + window_buttons_->GetBaseWidth() + style->TitleIndent(); |
3327 | + title_geo_.x = geo.x + window_buttons_->GetBaseWidth() + (style->TitleIndent() * dpi_scale); |
3328 | |
3329 | if (!window_buttons_->focused()) |
3330 | state = WidgetState::BACKDROP; |
3331 | } |
3332 | else |
3333 | { |
3334 | - title_geo_.x = geo.x + MAIN_LEFT_PADDING + TITLE_PADDING; |
3335 | + title_geo_.x = geo.x + (MAIN_LEFT_PADDING + TITLE_PADDING) * dpi_scale; |
3336 | } |
3337 | |
3338 | - title_geo_.y = geo.y + (geo.height - text_size.height) / 2; |
3339 | - title_geo_.width = std::min(text_size.width, geo.width - title_geo_.x); |
3340 | - title_geo_.height = text_size.height; |
3341 | + title_geo_.y = geo.y + (geo.height - (text_size.height * dpi_scale)) / 2; |
3342 | + title_geo_.width = std::min<int>(std::ceil(text_size.width * dpi_scale), geo.width - title_geo_.x); |
3343 | + title_geo_.height = std::ceil(text_size.height * dpi_scale); |
3344 | |
3345 | nux::CairoGraphics cairo_graphics(CAIRO_FORMAT_ARGB32, title_geo_.width, title_geo_.height); |
3346 | + cairo_surface_set_device_scale(cairo_graphics.GetSurface(), dpi_scale, dpi_scale); |
3347 | cairo_t* cr = cairo_graphics.GetInternalContext(); |
3348 | - style->DrawTitle(label, state, cr, title_geo_.width, title_geo_.height); |
3349 | + style->DrawTitle(label, state, cr, title_geo_.width / dpi_scale, title_geo_.height / dpi_scale); |
3350 | title_texture_ = texture_ptr_from_cairo_graphics(cairo_graphics); |
3351 | } |
3352 | |
3353 | @@ -1685,9 +1686,9 @@ |
3354 | |
3355 | void PanelMenuView::SetMonitor(int monitor) |
3356 | { |
3357 | - monitor_ = monitor; |
3358 | + PanelIndicatorsView::SetMonitor(monitor); |
3359 | + |
3360 | monitor_geo_ = UScreen::GetDefault()->GetMonitorGeometry(monitor_); |
3361 | - |
3362 | maximized_set_.clear(); |
3363 | GList* windows = bamf_matcher_get_window_stack_for_monitor(matcher_, monitor_); |
3364 | |
3365 | @@ -1722,6 +1723,7 @@ |
3366 | window_buttons_->monitor = monitor_; |
3367 | window_buttons_->controlled_window = buttons_win; |
3368 | |
3369 | + OnStyleChanged(); |
3370 | g_list_free(windows); |
3371 | } |
3372 | |
3373 | |
3374 | === modified file 'panel/PanelMenuView.h' |
3375 | --- panel/PanelMenuView.h 2014-02-19 02:16:22 +0000 |
3376 | +++ panel/PanelMenuView.h 2014-03-03 11:01:22 +0000 |
3377 | @@ -59,8 +59,6 @@ |
3378 | virtual void OverlayShown(); |
3379 | virtual void OverlayHidden(); |
3380 | |
3381 | - void OnDPIChanged(); |
3382 | - |
3383 | protected: |
3384 | std::string GetName() const; |
3385 | void AddProperties(debug::IntrospectionData&); |
3386 | @@ -92,6 +90,7 @@ |
3387 | void OnActiveWindowChanged(BamfMatcher* matcher, BamfView* old_view, BamfView* new_view); |
3388 | void OnActiveAppChanged(BamfMatcher* matcher, BamfApplication* old_app, BamfApplication* new_app); |
3389 | void OnNameChanged(BamfView* bamf_view, gchar* new_name, gchar* old_name); |
3390 | + void OnStyleChanged(); |
3391 | |
3392 | void OnSpreadInitiate(); |
3393 | void OnSpreadTerminate(); |
3394 | |
3395 | === modified file 'panel/PanelView.cpp' |
3396 | --- panel/PanelView.cpp 2014-02-18 21:20:28 +0000 |
3397 | +++ panel/PanelView.cpp 2014-03-03 11:01:22 +0000 |
3398 | @@ -73,7 +73,7 @@ |
3399 | { |
3400 | auto& wm = WindowManager::Default(); |
3401 | panel::Style::Instance().changed.connect(sigc::mem_fun(this, &PanelView::ForceUpdateBackground)); |
3402 | - unity::Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &PanelView::OnDPIChanged)); |
3403 | + Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &PanelView::Resize)); |
3404 | |
3405 | wm.average_color.changed.connect(sigc::mem_fun(this, &PanelView::OnBackgroundUpdate)); |
3406 | wm.initiate_spread.connect(sigc::mem_fun(this, &PanelView::OnSpreadInitiate)); |
3407 | @@ -171,13 +171,6 @@ |
3408 | return tray_->xid(); |
3409 | } |
3410 | |
3411 | -void PanelView::OnDPIChanged() |
3412 | -{ |
3413 | - int height = panel::Style::Instance().PanelHeight(monitor_); |
3414 | - tray_->SetMinMaxSize(1, height); |
3415 | - menu_view_->OnDPIChanged(); |
3416 | -} |
3417 | - |
3418 | void PanelView::SetLauncherWidth(int width) |
3419 | { |
3420 | launcher_width_ = width; |
3421 | @@ -475,7 +468,6 @@ |
3422 | |
3423 | refine_geo.x = refine_x_pos; |
3424 | refine_geo.width = bg_refine_tex_->GetWidth(); |
3425 | - refine_geo.height = bg_refine_tex_->GetHeight(); |
3426 | |
3427 | if (!Settings::Instance().GetLowGfxMode()) |
3428 | { |
3429 | @@ -484,7 +476,6 @@ |
3430 | |
3431 | refine_geo.x += refine_geo.width; |
3432 | refine_geo.width = geo.width; |
3433 | - refine_geo.height = geo.height; |
3434 | nux::GetPainter().PushLayer(GfxContext, refine_geo, bg_refine_single_column_layer_.get()); |
3435 | bgs++; |
3436 | } |
3437 | @@ -800,21 +791,24 @@ |
3438 | monitor_ = monitor; |
3439 | menu_view_->SetMonitor(monitor); |
3440 | indicators_->SetMonitor(monitor); |
3441 | - |
3442 | - int height = panel::Style::Instance().PanelHeight(monitor_); |
3443 | - SetMinMaxSize(height, height); |
3444 | - |
3445 | - UScreen* uscreen = UScreen::GetDefault(); |
3446 | - auto monitor_geo = uscreen->GetMonitorGeometry(monitor); |
3447 | - Resize(nux::Point(monitor_geo.x, monitor_geo.y), monitor_geo.width); |
3448 | + Resize(); |
3449 | } |
3450 | |
3451 | -void PanelView::Resize(nux::Point const& offset, int width) |
3452 | +void PanelView::Resize() |
3453 | { |
3454 | - unity::panel::Style &panel_style = panel::Style::Instance(); |
3455 | - SetMaximumWidth(width); |
3456 | - SetGeometry(nux::Geometry(0, 0, width, panel_style.PanelHeight(monitor_))); |
3457 | - parent_->SetGeometry(nux::Geometry(offset.x, offset.y, width, panel_style.PanelHeight(monitor_))); |
3458 | + int height = Style::Instance().PanelHeight(monitor_); |
3459 | + auto const& monitor_geo = UScreen::GetDefault()->GetMonitorGeometry(monitor_); |
3460 | + |
3461 | + SetMinMaxSize(monitor_geo.width, height); |
3462 | + parent_->SetGeometry({monitor_geo.x, monitor_geo.y, monitor_geo.width, height}); |
3463 | + |
3464 | + for (auto* child : layout_->GetChildren()) |
3465 | + { |
3466 | + child->SetMinimumHeight(height); |
3467 | + child->SetMaximumHeight(height); |
3468 | + } |
3469 | + |
3470 | + QueueRelayout(); |
3471 | } |
3472 | |
3473 | int PanelView::GetMonitor() const |
3474 | |
3475 | === modified file 'panel/PanelView.h' |
3476 | --- panel/PanelView.h 2014-02-18 21:20:28 +0000 |
3477 | +++ panel/PanelView.h 2014-03-03 11:01:22 +0000 |
3478 | @@ -104,15 +104,13 @@ |
3479 | |
3480 | bool ActivateFirstSensitive(); |
3481 | bool ActivateEntry(std::string const& entry_id); |
3482 | - void Resize(nux::Point const& offset, int width); |
3483 | + void Resize(); |
3484 | bool IsTransparent(); |
3485 | void UpdateBackground(); |
3486 | void ForceUpdateBackground(); |
3487 | bool TrackMenuPointer(); |
3488 | void SyncGeometries(); |
3489 | void AddPanelView(PanelIndicatorsView* child, unsigned int stretchFactor); |
3490 | - |
3491 | - void OnDPIChanged(); |
3492 | |
3493 | MockableBaseWindow* parent_; |
3494 | indicator::Indicators::Ptr remote_; |
3495 | |
3496 | === modified file 'plugins/unityshell/src/unityshell.cpp' |
3497 | --- plugins/unityshell/src/unityshell.cpp 2014-02-19 02:16:22 +0000 |
3498 | +++ plugins/unityshell/src/unityshell.cpp 2014-03-03 11:01:22 +0000 |
3499 | @@ -890,10 +890,12 @@ |
3500 | |
3501 | void UnityScreen::DrawPanelUnderDash() |
3502 | { |
3503 | - if (!paint_panel_under_dash_ || !launcher_controller_->IsOverlayOpen()) |
3504 | + if (!paint_panel_under_dash_ || (!dash_controller_->IsVisible() && !hud_controller_->IsVisible())) |
3505 | return; |
3506 | |
3507 | - if (_last_output->id() != screen->currentOutputDev().id()) |
3508 | + auto const& output_dev = screen->currentOutputDev(); |
3509 | + |
3510 | + if (_last_output->id() != output_dev.id()) |
3511 | return; |
3512 | |
3513 | auto graphics_engine = nux::GetGraphicsDisplay()->GetGraphicsEngine(); |
3514 | @@ -904,18 +906,17 @@ |
3515 | graphics_engine->ResetModelViewMatrixStack(); |
3516 | graphics_engine->Push2DTranslationModelViewMatrix(0.0f, 0.0f, 0.0f); |
3517 | graphics_engine->ResetProjectionMatrix(); |
3518 | - graphics_engine->SetOrthographicProjectionMatrix(screen->width(), screen->height()); |
3519 | + graphics_engine->SetOrthographicProjectionMatrix(output_dev.width(), output_dev.height()); |
3520 | |
3521 | nux::TexCoordXForm texxform; |
3522 | texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_CLAMP); |
3523 | |
3524 | - // FIXME Change to paint per monitor vs all at once |
3525 | - int panel_height = panel_style_.PanelHeight(); |
3526 | - auto const& texture = panel_style_.GetBackground()->GetDeviceTexture(); |
3527 | - graphics_engine->QRP_GLSL_1Tex(0, 0, screen->width(), panel_height, texture, texxform, nux::color::White); |
3528 | + int monitor = WindowManager::Default().MonitorGeometryIn(NuxGeometryFromCompRect(output_dev)); |
3529 | + auto const& texture = panel_style_.GetBackground(monitor)->GetDeviceTexture(); |
3530 | + graphics_engine->QRP_GLSL_1Tex(0, 0, output_dev.width(), texture->GetHeight(), texture, texxform, nux::color::White); |
3531 | } |
3532 | |
3533 | -bool UnityScreen::forcePaintOnTop () |
3534 | +bool UnityScreen::forcePaintOnTop() |
3535 | { |
3536 | return !allowWindowPaint || |
3537 | ((switcher_controller_->Visible() || |
3538 | @@ -2852,9 +2853,12 @@ |
3539 | const CompRegion& region, |
3540 | unsigned int mask) |
3541 | { |
3542 | - if (uScreen->doShellRepaint && !uScreen->paint_panel_under_dash_ && window->type() == CompWindowTypeNormalMask) |
3543 | + auto window_state = window->state(); |
3544 | + auto window_type = window->type(); |
3545 | + |
3546 | + if (uScreen->doShellRepaint && !uScreen->paint_panel_under_dash_ && window_type == CompWindowTypeNormalMask) |
3547 | { |
3548 | - if ((window->state() & MAXIMIZE_STATE) && window->onCurrentDesktop() && !window->overrideRedirect() && window->managed()) |
3549 | + if ((window_state & MAXIMIZE_STATE) && window->onCurrentDesktop() && !window->overrideRedirect() && window->managed()) |
3550 | { |
3551 | CompPoint const& viewport = window->defaultViewport(); |
3552 | unsigned output = window->outputDevice(); |
3553 | @@ -2887,7 +2891,7 @@ |
3554 | { |
3555 | Window active_window = screen->activeWindow(); |
3556 | |
3557 | - if (G_UNLIKELY(window->type() == CompWindowTypeDesktopMask)) |
3558 | + if (G_UNLIKELY(window_type == CompWindowTypeDesktopMask)) |
3559 | { |
3560 | uScreen->setPanelShadowMatrix(matrix); |
3561 | |
3562 | @@ -2907,9 +2911,9 @@ |
3563 | draw_panel_shadow = DrawPanelShadow::BELOW_WINDOW; |
3564 | uScreen->is_desktop_active_ = false; |
3565 | |
3566 | - if (!(window->state() & CompWindowStateMaximizedVertMask) && |
3567 | - !(window->state() & CompWindowStateFullscreenMask) && |
3568 | - !(window->type() & CompWindowTypeFullscreenMask)) |
3569 | + if (!(window_state & CompWindowStateMaximizedVertMask) && |
3570 | + !(window_state & CompWindowStateFullscreenMask) && |
3571 | + !(window_type & CompWindowTypeFullscreenMask)) |
3572 | { |
3573 | WindowManager& wm = WindowManager::Default(); |
3574 | auto const& output = uScreen->screen->currentOutputDev(); |
3575 | @@ -3817,8 +3821,7 @@ |
3576 | |
3577 | if (texture->width() && texture->height()) |
3578 | { |
3579 | - GLTexture::MatrixList ml(1); |
3580 | - ml[0] = texture->matrix(); |
3581 | + GLTexture::MatrixList ml({texture->matrix()}); |
3582 | CompRegion texture_region(0, 0, texture->width(), texture->height()); |
3583 | gWindow->glAddGeometry(ml, texture_region, texture_region); |
3584 | } |
3585 | @@ -3841,16 +3844,13 @@ |
3586 | |
3587 | using namespace decoration; |
3588 | |
3589 | - // We need to scale the cairo matrix in order to get the properly scaled |
3590 | - cairo_save(ctx); |
3591 | - cairo_scale(ctx, aspect, aspect); |
3592 | - int w = std::round(ctx.width() / aspect); |
3593 | - int h = std::round(ctx.height() / aspect); |
3594 | + aspect *= deco_win_->dpi_scale(); |
3595 | + double w = ctx.width() / aspect; |
3596 | + double h = ctx.height() / aspect; |
3597 | Style::Get()->DrawSide(Side::TOP, WidgetState::NORMAL, ctx, w, h); |
3598 | - cairo_restore(ctx); |
3599 | } |
3600 | |
3601 | -void UnityWindow::RenderTitle(compiz_utils::CairoContext const& ctx, int x, int y, int width, int height) |
3602 | +void UnityWindow::RenderTitle(compiz_utils::CairoContext const& ctx, int x, int y, int width, int height, double aspect) |
3603 | { |
3604 | using namespace decoration; |
3605 | auto const& style = Style::Get(); |
3606 | @@ -3860,6 +3860,7 @@ |
3607 | y += (height - text_size.height)/2; |
3608 | |
3609 | cairo_save(ctx); |
3610 | + cairo_scale(ctx, 1.0f/aspect, 1.0f/aspect); |
3611 | cairo_translate(ctx, x, y); |
3612 | style->DrawTitle(title, WidgetState::NORMAL, ctx, width - x, height); |
3613 | cairo_restore(ctx); |
3614 | @@ -3867,14 +3868,12 @@ |
3615 | |
3616 | void UnityWindow::BuildDecorationTexture() |
3617 | { |
3618 | - if (decoration_tex_) |
3619 | - return; |
3620 | - |
3621 | auto const& border = decoration::Style::Get()->Border(); |
3622 | |
3623 | if (border.top) |
3624 | { |
3625 | - compiz_utils::CairoContext context(window->borderRect().width(), border.top); |
3626 | + double dpi_scale = deco_win_->dpi_scale(); |
3627 | + compiz_utils::CairoContext context(window->borderRect().width(), border.top * dpi_scale, dpi_scale); |
3628 | RenderDecoration(context); |
3629 | decoration_tex_ = context; |
3630 | } |
3631 | @@ -3896,7 +3895,8 @@ |
3632 | if (!compiz_utils::IsWindowFullyDecorable(window)) |
3633 | return; |
3634 | |
3635 | - BuildDecorationTexture(); |
3636 | + if (!decoration_tex_) |
3637 | + BuildDecorationTexture(); |
3638 | |
3639 | if (decoration_tex_) |
3640 | DrawTexture(*decoration_tex_, attrib, transform, mask, geo.x, geo.y, scale); |
3641 | @@ -3906,8 +3906,9 @@ |
3642 | else |
3643 | { |
3644 | auto const& style = decoration::Style::Get(); |
3645 | + double dpi_scale = deco_win_->dpi_scale(); |
3646 | int width = geo.width; |
3647 | - int height = style->Border().top; |
3648 | + int height = style->Border().top * dpi_scale; |
3649 | auto const& padding = style->Padding(decoration::Side::TOP); |
3650 | bool redraw_decoration = true; |
3651 | compiz_utils::SimpleTexture::Ptr close_texture; |
3652 | @@ -3925,19 +3926,19 @@ |
3653 | if (window->actions() & CompWindowActionCloseMask) |
3654 | { |
3655 | using namespace decoration; |
3656 | - close_texture = DataPool::Get()->ButtonTexture(WindowButtonType::CLOSE, close_icon_state_); |
3657 | + close_texture = DataPool::Get()->ButtonTexture(dpi_scale, WindowButtonType::CLOSE, close_icon_state_); |
3658 | } |
3659 | |
3660 | if (redraw_decoration) |
3661 | { |
3662 | if (width != 0 && height != 0) |
3663 | { |
3664 | - compiz_utils::CairoContext context(width, height); |
3665 | + compiz_utils::CairoContext context(width, height, scale * dpi_scale); |
3666 | RenderDecoration(context, scale); |
3667 | |
3668 | // Draw window title |
3669 | - int text_x = padding.left + (close_texture ? close_texture->width() : 0); |
3670 | - RenderTitle(context, text_x, padding.top, width - padding.right, height); |
3671 | + int text_x = padding.left + (close_texture ? close_texture->width() : 0) / dpi_scale; |
3672 | + RenderTitle(context, text_x, padding.top, (width - padding.right) / dpi_scale, height / dpi_scale, scale); |
3673 | decoration_selected_tex_ = context; |
3674 | uScreen->damageRegion(CompRegionFromNuxGeo(geo)); |
3675 | } |
3676 | @@ -3953,10 +3954,12 @@ |
3677 | |
3678 | if (close_texture) |
3679 | { |
3680 | - int x = geo.x + padding.left; |
3681 | - int y = geo.y + padding.top + (height - close_texture->height()) / 2.0f; |
3682 | + int w = close_texture->width(); |
3683 | + int h = close_texture->height(); |
3684 | + int x = geo.x + padding.left * dpi_scale; |
3685 | + int y = geo.y + padding.top * dpi_scale + (height - w) / 2.0f; |
3686 | |
3687 | - close_button_geo_.Set(x, y, close_texture->width(), close_texture->height()); |
3688 | + close_button_geo_.Set(x, y, w, h); |
3689 | DrawTexture(*close_texture, attrib, transform, mask, x, y); |
3690 | } |
3691 | else |
3692 | @@ -4041,7 +4044,8 @@ |
3693 | { |
3694 | using namespace decoration; |
3695 | auto const& style = Style::Get(); |
3696 | - unsigned glow_size = style->GlowSize(); |
3697 | + double dpi_scale = deco_win_->dpi_scale(); |
3698 | + unsigned glow_size = std::round(style->GlowSize() * dpi_scale); |
3699 | auto const& glow_texture = DataPool::Get()->GlowTexture(); |
3700 | |
3701 | if (!glow_size || !glow_texture) |
3702 | @@ -4054,7 +4058,7 @@ |
3703 | { |
3704 | // We paint the glow below the window edges to correctly |
3705 | // render the rounded corners |
3706 | - int inside_glow = decoration_radius / 4; |
3707 | + int inside_glow = decoration_radius * dpi_scale / 4; |
3708 | glow_size += inside_glow; |
3709 | glow_geo.Expand(-inside_glow, -inside_glow); |
3710 | } |
3711 | |
3712 | === modified file 'plugins/unityshell/src/unityshell.h' |
3713 | --- plugins/unityshell/src/unityshell.h 2014-02-18 21:21:16 +0000 |
3714 | +++ plugins/unityshell/src/unityshell.h 2014-03-03 11:01:22 +0000 |
3715 | @@ -519,7 +519,7 @@ |
3716 | compiz::WindowInputRemoverLock::Ptr GetInputRemover (); |
3717 | |
3718 | void RenderDecoration(compiz_utils::CairoContext const&, double aspect = 1.0f); |
3719 | - void RenderTitle(compiz_utils::CairoContext const&, int x, int y, int width, int height); |
3720 | + void RenderTitle(compiz_utils::CairoContext const&, int x, int y, int width, int height, double aspect = 1.0f); |
3721 | void DrawTexture(GLTexture::List const& textures, GLWindowPaintAttrib const&, |
3722 | GLMatrix const&, unsigned mask, int x, int y, double aspect = 1.0f); |
3723 | |
3724 | |
3725 | === removed file 'resources/close_dash.png' |
3726 | Binary 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 |
3727 | === added file 'resources/close_dash.svg' |
3728 | --- resources/close_dash.svg 1970-01-01 00:00:00 +0000 |
3729 | +++ resources/close_dash.svg 2014-03-03 11:01:22 +0000 |
3730 | @@ -0,0 +1,74 @@ |
3731 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
3732 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
3733 | + |
3734 | +<svg |
3735 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
3736 | + xmlns:cc="http://creativecommons.org/ns#" |
3737 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
3738 | + xmlns:svg="http://www.w3.org/2000/svg" |
3739 | + xmlns="http://www.w3.org/2000/svg" |
3740 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
3741 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
3742 | + width="19" |
3743 | + height="19" |
3744 | + id="svg4486" |
3745 | + version="1.1" |
3746 | + inkscape:version="0.48+devel r" |
3747 | + viewBox="0 0 19 19" |
3748 | + sodipodi:docname="close_dash.svg"> |
3749 | + <defs |
3750 | + id="defs4488" /> |
3751 | + <sodipodi:namedview |
3752 | + id="base" |
3753 | + pagecolor="#ffffff" |
3754 | + bordercolor="#666666" |
3755 | + borderopacity="1.0" |
3756 | + inkscape:pageopacity="0.0" |
3757 | + inkscape:pageshadow="2" |
3758 | + inkscape:zoom="0.35" |
3759 | + inkscape:cx="9.5000027" |
3760 | + inkscape:cy="9.5000031" |
3761 | + inkscape:document-units="px" |
3762 | + inkscape:current-layer="layer1" |
3763 | + showgrid="false" |
3764 | + fit-margin-top="0" |
3765 | + fit-margin-left="0" |
3766 | + fit-margin-right="0" |
3767 | + fit-margin-bottom="0" /> |
3768 | + <metadata |
3769 | + id="metadata4491"> |
3770 | + <rdf:RDF> |
3771 | + <cc:Work |
3772 | + rdf:about=""> |
3773 | + <dc:format>image/svg+xml</dc:format> |
3774 | + <dc:type |
3775 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
3776 | + <dc:title></dc:title> |
3777 | + </cc:Work> |
3778 | + </rdf:RDF> |
3779 | + </metadata> |
3780 | + <g |
3781 | + inkscape:label="Layer 1" |
3782 | + inkscape:groupmode="layer" |
3783 | + id="layer1" |
3784 | + transform="translate(290.21429,-522.86219)"> |
3785 | + <g |
3786 | + transform="translate(-289.7143,-511.00011)" |
3787 | + style="display:inline" |
3788 | + id="g4113"> |
3789 | + <path |
3790 | + id="circle4507" |
3791 | + transform="translate(-76.500002,938.36224)" |
3792 | + 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" |
3793 | + 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" |
3794 | + inkscape:connector-curvature="0" /> |
3795 | + <rect |
3796 | + y="1033.8623" |
3797 | + x="-0.5000006" |
3798 | + height="19" |
3799 | + width="19" |
3800 | + id="rect4539" |
3801 | + style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
3802 | + </g> |
3803 | + </g> |
3804 | +</svg> |
3805 | |
3806 | === removed file 'resources/close_dash_disabled.png' |
3807 | Binary 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 |
3808 | === added file 'resources/close_dash_disabled.svg' |
3809 | --- resources/close_dash_disabled.svg 1970-01-01 00:00:00 +0000 |
3810 | +++ resources/close_dash_disabled.svg 2014-03-03 11:01:22 +0000 |
3811 | @@ -0,0 +1,74 @@ |
3812 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
3813 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
3814 | + |
3815 | +<svg |
3816 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
3817 | + xmlns:cc="http://creativecommons.org/ns#" |
3818 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
3819 | + xmlns:svg="http://www.w3.org/2000/svg" |
3820 | + xmlns="http://www.w3.org/2000/svg" |
3821 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
3822 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
3823 | + width="19" |
3824 | + height="19" |
3825 | + id="svg4486" |
3826 | + version="1.1" |
3827 | + inkscape:version="0.48+devel r" |
3828 | + viewBox="0 0 19 19" |
3829 | + sodipodi:docname="close_dash_disabled.svg"> |
3830 | + <defs |
3831 | + id="defs4488" /> |
3832 | + <sodipodi:namedview |
3833 | + id="base" |
3834 | + pagecolor="#ffffff" |
3835 | + bordercolor="#666666" |
3836 | + borderopacity="1.0" |
3837 | + inkscape:pageopacity="0.0" |
3838 | + inkscape:pageshadow="2" |
3839 | + inkscape:zoom="7.9580786" |
3840 | + inkscape:cx="-7.3730107" |
3841 | + inkscape:cy="9.9678584" |
3842 | + inkscape:document-units="px" |
3843 | + inkscape:current-layer="layer1" |
3844 | + showgrid="false" |
3845 | + fit-margin-top="0" |
3846 | + fit-margin-left="0" |
3847 | + fit-margin-right="0" |
3848 | + fit-margin-bottom="0" /> |
3849 | + <metadata |
3850 | + id="metadata4491"> |
3851 | + <rdf:RDF> |
3852 | + <cc:Work |
3853 | + rdf:about=""> |
3854 | + <dc:format>image/svg+xml</dc:format> |
3855 | + <dc:type |
3856 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
3857 | + <dc:title></dc:title> |
3858 | + </cc:Work> |
3859 | + </rdf:RDF> |
3860 | + </metadata> |
3861 | + <g |
3862 | + inkscape:label="Layer 1" |
3863 | + inkscape:groupmode="layer" |
3864 | + id="layer1" |
3865 | + transform="translate(290.21429,-522.86219)"> |
3866 | + <g |
3867 | + style="display:inline" |
3868 | + id="g4117" |
3869 | + transform="translate(-289.71429,-511.00011)"> |
3870 | + <path |
3871 | + 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" |
3872 | + 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" |
3873 | + transform="translate(-76.500002,938.36224)" |
3874 | + id="path4119" |
3875 | + inkscape:connector-curvature="0" /> |
3876 | + <rect |
3877 | + style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
3878 | + id="rect4121" |
3879 | + width="19" |
3880 | + height="19" |
3881 | + x="-0.5000006" |
3882 | + y="1033.8623" /> |
3883 | + </g> |
3884 | + </g> |
3885 | +</svg> |
3886 | |
3887 | === removed file 'resources/close_dash_prelight.png' |
3888 | Binary 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 |
3889 | === added file 'resources/close_dash_prelight.svg' |
3890 | --- resources/close_dash_prelight.svg 1970-01-01 00:00:00 +0000 |
3891 | +++ resources/close_dash_prelight.svg 2014-03-03 11:01:22 +0000 |
3892 | @@ -0,0 +1,94 @@ |
3893 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
3894 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
3895 | + |
3896 | +<svg |
3897 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
3898 | + xmlns:cc="http://creativecommons.org/ns#" |
3899 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
3900 | + xmlns:svg="http://www.w3.org/2000/svg" |
3901 | + xmlns="http://www.w3.org/2000/svg" |
3902 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
3903 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
3904 | + width="19" |
3905 | + height="19" |
3906 | + id="svg4486" |
3907 | + version="1.1" |
3908 | + inkscape:version="0.48+devel r" |
3909 | + viewBox="0 0 19 19" |
3910 | + sodipodi:docname="close_dash_prelight.svg"> |
3911 | + <defs |
3912 | + id="defs4488"> |
3913 | + <filter |
3914 | + inkscape:collect="always" |
3915 | + style="color-interpolation-filters:sRGB" |
3916 | + id="filter4195" |
3917 | + x="-0.12" |
3918 | + width="1.24" |
3919 | + y="-0.12" |
3920 | + height="1.24"> |
3921 | + <feGaussianBlur |
3922 | + inkscape:collect="always" |
3923 | + stdDeviation="0.75" |
3924 | + id="feGaussianBlur4197" /> |
3925 | + </filter> |
3926 | + </defs> |
3927 | + <sodipodi:namedview |
3928 | + id="base" |
3929 | + pagecolor="#ffffff" |
3930 | + bordercolor="#666666" |
3931 | + borderopacity="1.0" |
3932 | + inkscape:pageopacity="0.0" |
3933 | + inkscape:pageshadow="2" |
3934 | + inkscape:zoom="7.9580786" |
3935 | + inkscape:cx="-7.3730107" |
3936 | + inkscape:cy="9.9678584" |
3937 | + inkscape:document-units="px" |
3938 | + inkscape:current-layer="layer1" |
3939 | + showgrid="false" |
3940 | + fit-margin-top="0" |
3941 | + fit-margin-left="0" |
3942 | + fit-margin-right="0" |
3943 | + fit-margin-bottom="0" /> |
3944 | + <metadata |
3945 | + id="metadata4491"> |
3946 | + <rdf:RDF> |
3947 | + <cc:Work |
3948 | + rdf:about=""> |
3949 | + <dc:format>image/svg+xml</dc:format> |
3950 | + <dc:type |
3951 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
3952 | + <dc:title></dc:title> |
3953 | + </cc:Work> |
3954 | + </rdf:RDF> |
3955 | + </metadata> |
3956 | + <g |
3957 | + inkscape:label="Layer 1" |
3958 | + inkscape:groupmode="layer" |
3959 | + id="layer1" |
3960 | + transform="translate(290.21429,-522.86219)"> |
3961 | + <g |
3962 | + style="display:inline" |
3963 | + id="g4131" |
3964 | + transform="translate(-289.71429,-511.00011)"> |
3965 | + <path |
3966 | + 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" |
3967 | + 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" |
3968 | + transform="translate(-76.500002,938.36224)" |
3969 | + id="path4133" |
3970 | + inkscape:connector-curvature="0" /> |
3971 | + <rect |
3972 | + style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
3973 | + id="rect4135" |
3974 | + width="19" |
3975 | + height="19" |
3976 | + x="-0.5000006" |
3977 | + y="1033.8623" /> |
3978 | + <path |
3979 | + inkscape:connector-curvature="0" |
3980 | + id="path4137" |
3981 | + transform="translate(-76.500002,938.36224)" |
3982 | + 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" |
3983 | + 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" /> |
3984 | + </g> |
3985 | + </g> |
3986 | +</svg> |
3987 | |
3988 | === removed file 'resources/close_dash_pressed.png' |
3989 | Binary 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 |
3990 | === added file 'resources/close_dash_pressed.svg' |
3991 | --- resources/close_dash_pressed.svg 1970-01-01 00:00:00 +0000 |
3992 | +++ resources/close_dash_pressed.svg 2014-03-03 11:01:22 +0000 |
3993 | @@ -0,0 +1,74 @@ |
3994 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
3995 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
3996 | + |
3997 | +<svg |
3998 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
3999 | + xmlns:cc="http://creativecommons.org/ns#" |
4000 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
4001 | + xmlns:svg="http://www.w3.org/2000/svg" |
4002 | + xmlns="http://www.w3.org/2000/svg" |
4003 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
4004 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
4005 | + width="19" |
4006 | + height="19" |
4007 | + id="svg4486" |
4008 | + version="1.1" |
4009 | + inkscape:version="0.48+devel r" |
4010 | + viewBox="0 0 19 19" |
4011 | + sodipodi:docname="close_dash_pressed.svg"> |
4012 | + <defs |
4013 | + id="defs4488" /> |
4014 | + <sodipodi:namedview |
4015 | + id="base" |
4016 | + pagecolor="#ffffff" |
4017 | + bordercolor="#666666" |
4018 | + borderopacity="1.0" |
4019 | + inkscape:pageopacity="0.0" |
4020 | + inkscape:pageshadow="2" |
4021 | + inkscape:zoom="7.9580786" |
4022 | + inkscape:cx="-7.3730107" |
4023 | + inkscape:cy="9.9678584" |
4024 | + inkscape:document-units="px" |
4025 | + inkscape:current-layer="layer1" |
4026 | + showgrid="false" |
4027 | + fit-margin-top="0" |
4028 | + fit-margin-left="0" |
4029 | + fit-margin-right="0" |
4030 | + fit-margin-bottom="0" /> |
4031 | + <metadata |
4032 | + id="metadata4491"> |
4033 | + <rdf:RDF> |
4034 | + <cc:Work |
4035 | + rdf:about=""> |
4036 | + <dc:format>image/svg+xml</dc:format> |
4037 | + <dc:type |
4038 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
4039 | + <dc:title></dc:title> |
4040 | + </cc:Work> |
4041 | + </rdf:RDF> |
4042 | + </metadata> |
4043 | + <g |
4044 | + inkscape:label="Layer 1" |
4045 | + inkscape:groupmode="layer" |
4046 | + id="layer1" |
4047 | + transform="translate(290.21429,-522.86219)"> |
4048 | + <g |
4049 | + transform="translate(-289.71429,-511.00011)" |
4050 | + id="g4123" |
4051 | + style="opacity:0.6;display:inline"> |
4052 | + <path |
4053 | + inkscape:connector-curvature="0" |
4054 | + id="path4125" |
4055 | + transform="translate(-76.500002,938.36224)" |
4056 | + 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" |
4057 | + 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" /> |
4058 | + <rect |
4059 | + y="1033.8623" |
4060 | + x="-0.5000006" |
4061 | + height="19" |
4062 | + width="19" |
4063 | + id="rect4127" |
4064 | + style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
4065 | + </g> |
4066 | + </g> |
4067 | +</svg> |
4068 | |
4069 | === removed file 'resources/maximize_dash.png' |
4070 | Binary 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 |
4071 | === added file 'resources/maximize_dash.svg' |
4072 | --- resources/maximize_dash.svg 1970-01-01 00:00:00 +0000 |
4073 | +++ resources/maximize_dash.svg 2014-03-03 11:01:22 +0000 |
4074 | @@ -0,0 +1,73 @@ |
4075 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
4076 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
4077 | + |
4078 | +<svg |
4079 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
4080 | + xmlns:cc="http://creativecommons.org/ns#" |
4081 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
4082 | + xmlns:svg="http://www.w3.org/2000/svg" |
4083 | + xmlns="http://www.w3.org/2000/svg" |
4084 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
4085 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
4086 | + width="19" |
4087 | + height="19" |
4088 | + id="svg4486" |
4089 | + version="1.1" |
4090 | + inkscape:version="0.48+devel r" |
4091 | + viewBox="0 0 19 19" |
4092 | + sodipodi:docname="maximize_dash.svg"> |
4093 | + <defs |
4094 | + id="defs4488" /> |
4095 | + <sodipodi:namedview |
4096 | + id="base" |
4097 | + pagecolor="#ffffff" |
4098 | + bordercolor="#666666" |
4099 | + borderopacity="1.0" |
4100 | + inkscape:pageopacity="0.0" |
4101 | + inkscape:pageshadow="2" |
4102 | + inkscape:zoom="7.9580786" |
4103 | + inkscape:cx="-7.3730107" |
4104 | + inkscape:cy="9.9678584" |
4105 | + inkscape:document-units="px" |
4106 | + inkscape:current-layer="layer1" |
4107 | + showgrid="false" |
4108 | + fit-margin-top="0" |
4109 | + fit-margin-left="0" |
4110 | + fit-margin-right="0" |
4111 | + fit-margin-bottom="0" /> |
4112 | + <metadata |
4113 | + id="metadata4491"> |
4114 | + <rdf:RDF> |
4115 | + <cc:Work |
4116 | + rdf:about=""> |
4117 | + <dc:format>image/svg+xml</dc:format> |
4118 | + <dc:type |
4119 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
4120 | + <dc:title></dc:title> |
4121 | + </cc:Work> |
4122 | + </rdf:RDF> |
4123 | + </metadata> |
4124 | + <g |
4125 | + inkscape:label="Layer 1" |
4126 | + inkscape:groupmode="layer" |
4127 | + id="layer1" |
4128 | + transform="translate(290.21429,-522.86219)"> |
4129 | + <g |
4130 | + transform="translate(-289.71429,-492.00011)" |
4131 | + style="display:inline" |
4132 | + id="g4218"> |
4133 | + <path |
4134 | + inkscape:connector-curvature="0" |
4135 | + id="path4209" |
4136 | + 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" |
4137 | + 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" /> |
4138 | + <rect |
4139 | + style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
4140 | + id="rect4203" |
4141 | + width="19" |
4142 | + height="19" |
4143 | + x="-0.5000006" |
4144 | + y="1014.8623" /> |
4145 | + </g> |
4146 | + </g> |
4147 | +</svg> |
4148 | |
4149 | === removed file 'resources/maximize_dash_disabled.png' |
4150 | Binary 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 |
4151 | === added file 'resources/maximize_dash_disabled.svg' |
4152 | --- resources/maximize_dash_disabled.svg 1970-01-01 00:00:00 +0000 |
4153 | +++ resources/maximize_dash_disabled.svg 2014-03-03 11:01:22 +0000 |
4154 | @@ -0,0 +1,73 @@ |
4155 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
4156 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
4157 | + |
4158 | +<svg |
4159 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
4160 | + xmlns:cc="http://creativecommons.org/ns#" |
4161 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
4162 | + xmlns:svg="http://www.w3.org/2000/svg" |
4163 | + xmlns="http://www.w3.org/2000/svg" |
4164 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
4165 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
4166 | + width="19" |
4167 | + height="19" |
4168 | + id="svg4486" |
4169 | + version="1.1" |
4170 | + inkscape:version="0.48+devel r" |
4171 | + viewBox="0 0 19 19" |
4172 | + sodipodi:docname="maximize_dash_disabled.svg"> |
4173 | + <defs |
4174 | + id="defs4488" /> |
4175 | + <sodipodi:namedview |
4176 | + id="base" |
4177 | + pagecolor="#ffffff" |
4178 | + bordercolor="#666666" |
4179 | + borderopacity="1.0" |
4180 | + inkscape:pageopacity="0.0" |
4181 | + inkscape:pageshadow="2" |
4182 | + inkscape:zoom="7.9580786" |
4183 | + inkscape:cx="-7.3730107" |
4184 | + inkscape:cy="9.9678584" |
4185 | + inkscape:document-units="px" |
4186 | + inkscape:current-layer="layer1" |
4187 | + showgrid="false" |
4188 | + fit-margin-top="0" |
4189 | + fit-margin-left="0" |
4190 | + fit-margin-right="0" |
4191 | + fit-margin-bottom="0" /> |
4192 | + <metadata |
4193 | + id="metadata4491"> |
4194 | + <rdf:RDF> |
4195 | + <cc:Work |
4196 | + rdf:about=""> |
4197 | + <dc:format>image/svg+xml</dc:format> |
4198 | + <dc:type |
4199 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
4200 | + <dc:title></dc:title> |
4201 | + </cc:Work> |
4202 | + </rdf:RDF> |
4203 | + </metadata> |
4204 | + <g |
4205 | + inkscape:label="Layer 1" |
4206 | + inkscape:groupmode="layer" |
4207 | + id="layer1" |
4208 | + transform="translate(290.21429,-522.86219)"> |
4209 | + <g |
4210 | + style="opacity:0.25;display:inline" |
4211 | + transform="translate(-289.71429,-492.00011)" |
4212 | + id="g4240"> |
4213 | + <path |
4214 | + inkscape:connector-curvature="0" |
4215 | + id="path4242" |
4216 | + 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" |
4217 | + 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" /> |
4218 | + <rect |
4219 | + style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
4220 | + id="rect4244" |
4221 | + width="19" |
4222 | + height="19" |
4223 | + x="-0.5000006" |
4224 | + y="1014.8623" /> |
4225 | + </g> |
4226 | + </g> |
4227 | +</svg> |
4228 | |
4229 | === removed file 'resources/maximize_dash_prelight.png' |
4230 | Binary 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 |
4231 | === added file 'resources/maximize_dash_prelight.svg' |
4232 | --- resources/maximize_dash_prelight.svg 1970-01-01 00:00:00 +0000 |
4233 | +++ resources/maximize_dash_prelight.svg 2014-03-03 11:01:22 +0000 |
4234 | @@ -0,0 +1,92 @@ |
4235 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
4236 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
4237 | + |
4238 | +<svg |
4239 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
4240 | + xmlns:cc="http://creativecommons.org/ns#" |
4241 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
4242 | + xmlns:svg="http://www.w3.org/2000/svg" |
4243 | + xmlns="http://www.w3.org/2000/svg" |
4244 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
4245 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
4246 | + width="19" |
4247 | + height="19" |
4248 | + id="svg4486" |
4249 | + version="1.1" |
4250 | + inkscape:version="0.48+devel r" |
4251 | + viewBox="0 0 19 19" |
4252 | + sodipodi:docname="maximize_dash_prelight.svg"> |
4253 | + <defs |
4254 | + id="defs4488"> |
4255 | + <filter |
4256 | + inkscape:collect="always" |
4257 | + style="color-interpolation-filters:sRGB" |
4258 | + id="filter4230" |
4259 | + x="-0.12" |
4260 | + width="1.24" |
4261 | + y="-0.12" |
4262 | + height="1.24"> |
4263 | + <feGaussianBlur |
4264 | + inkscape:collect="always" |
4265 | + stdDeviation="0.75" |
4266 | + id="feGaussianBlur4232" /> |
4267 | + </filter> |
4268 | + </defs> |
4269 | + <sodipodi:namedview |
4270 | + id="base" |
4271 | + pagecolor="#ffffff" |
4272 | + bordercolor="#666666" |
4273 | + borderopacity="1.0" |
4274 | + inkscape:pageopacity="0.0" |
4275 | + inkscape:pageshadow="2" |
4276 | + inkscape:zoom="7.9580786" |
4277 | + inkscape:cx="-7.3730107" |
4278 | + inkscape:cy="9.9678584" |
4279 | + inkscape:document-units="px" |
4280 | + inkscape:current-layer="layer1" |
4281 | + showgrid="false" |
4282 | + fit-margin-top="0" |
4283 | + fit-margin-left="0" |
4284 | + fit-margin-right="0" |
4285 | + fit-margin-bottom="0" /> |
4286 | + <metadata |
4287 | + id="metadata4491"> |
4288 | + <rdf:RDF> |
4289 | + <cc:Work |
4290 | + rdf:about=""> |
4291 | + <dc:format>image/svg+xml</dc:format> |
4292 | + <dc:type |
4293 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
4294 | + <dc:title></dc:title> |
4295 | + </cc:Work> |
4296 | + </rdf:RDF> |
4297 | + </metadata> |
4298 | + <g |
4299 | + inkscape:label="Layer 1" |
4300 | + inkscape:groupmode="layer" |
4301 | + id="layer1" |
4302 | + transform="translate(290.21429,-522.86219)"> |
4303 | + <g |
4304 | + style="display:inline" |
4305 | + id="g4222" |
4306 | + transform="translate(-289.71429,-492.00011)"> |
4307 | + <path |
4308 | + 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" |
4309 | + 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" |
4310 | + id="path4224" |
4311 | + inkscape:connector-curvature="0" /> |
4312 | + <rect |
4313 | + y="1014.8623" |
4314 | + x="-0.5000006" |
4315 | + height="19" |
4316 | + width="19" |
4317 | + id="rect4226" |
4318 | + style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
4319 | + <path |
4320 | + inkscape:connector-curvature="0" |
4321 | + id="path4228" |
4322 | + 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" |
4323 | + 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" /> |
4324 | + </g> |
4325 | + </g> |
4326 | +</svg> |
4327 | |
4328 | === removed file 'resources/maximize_dash_pressed.png' |
4329 | Binary 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 |
4330 | === added file 'resources/maximize_dash_pressed.svg' |
4331 | --- resources/maximize_dash_pressed.svg 1970-01-01 00:00:00 +0000 |
4332 | +++ resources/maximize_dash_pressed.svg 2014-03-03 11:01:22 +0000 |
4333 | @@ -0,0 +1,73 @@ |
4334 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
4335 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
4336 | + |
4337 | +<svg |
4338 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
4339 | + xmlns:cc="http://creativecommons.org/ns#" |
4340 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
4341 | + xmlns:svg="http://www.w3.org/2000/svg" |
4342 | + xmlns="http://www.w3.org/2000/svg" |
4343 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
4344 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
4345 | + width="19" |
4346 | + height="19" |
4347 | + id="svg4486" |
4348 | + version="1.1" |
4349 | + inkscape:version="0.48+devel r" |
4350 | + viewBox="0 0 19 19" |
4351 | + sodipodi:docname="maximize_dash_pressed.svg"> |
4352 | + <defs |
4353 | + id="defs4488" /> |
4354 | + <sodipodi:namedview |
4355 | + id="base" |
4356 | + pagecolor="#ffffff" |
4357 | + bordercolor="#666666" |
4358 | + borderopacity="1.0" |
4359 | + inkscape:pageopacity="0.0" |
4360 | + inkscape:pageshadow="2" |
4361 | + inkscape:zoom="7.9580786" |
4362 | + inkscape:cx="-7.3730107" |
4363 | + inkscape:cy="9.9678584" |
4364 | + inkscape:document-units="px" |
4365 | + inkscape:current-layer="layer1" |
4366 | + showgrid="false" |
4367 | + fit-margin-top="0" |
4368 | + fit-margin-left="0" |
4369 | + fit-margin-right="0" |
4370 | + fit-margin-bottom="0" /> |
4371 | + <metadata |
4372 | + id="metadata4491"> |
4373 | + <rdf:RDF> |
4374 | + <cc:Work |
4375 | + rdf:about=""> |
4376 | + <dc:format>image/svg+xml</dc:format> |
4377 | + <dc:type |
4378 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
4379 | + <dc:title></dc:title> |
4380 | + </cc:Work> |
4381 | + </rdf:RDF> |
4382 | + </metadata> |
4383 | + <g |
4384 | + inkscape:label="Layer 1" |
4385 | + inkscape:groupmode="layer" |
4386 | + id="layer1" |
4387 | + transform="translate(290.21429,-522.86219)"> |
4388 | + <g |
4389 | + id="g4234" |
4390 | + transform="translate(-289.71429,-492.00011)" |
4391 | + style="opacity:0.5;display:inline"> |
4392 | + <path |
4393 | + 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" |
4394 | + 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" |
4395 | + id="path4236" |
4396 | + inkscape:connector-curvature="0" /> |
4397 | + <rect |
4398 | + y="1014.8623" |
4399 | + x="-0.5000006" |
4400 | + height="19" |
4401 | + width="19" |
4402 | + id="rect4238" |
4403 | + style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
4404 | + </g> |
4405 | + </g> |
4406 | +</svg> |
4407 | |
4408 | === removed file 'resources/minimize_dash.png' |
4409 | Binary 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 |
4410 | === added file 'resources/minimize_dash.svg' |
4411 | --- resources/minimize_dash.svg 1970-01-01 00:00:00 +0000 |
4412 | +++ resources/minimize_dash.svg 2014-03-03 11:01:22 +0000 |
4413 | @@ -0,0 +1,74 @@ |
4414 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
4415 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
4416 | + |
4417 | +<svg |
4418 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
4419 | + xmlns:cc="http://creativecommons.org/ns#" |
4420 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
4421 | + xmlns:svg="http://www.w3.org/2000/svg" |
4422 | + xmlns="http://www.w3.org/2000/svg" |
4423 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
4424 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
4425 | + width="19" |
4426 | + height="19" |
4427 | + id="svg4486" |
4428 | + version="1.1" |
4429 | + inkscape:version="0.48+devel r" |
4430 | + viewBox="0 0 19 19" |
4431 | + sodipodi:docname="minimize_dash.svg"> |
4432 | + <defs |
4433 | + id="defs4488" /> |
4434 | + <sodipodi:namedview |
4435 | + id="base" |
4436 | + pagecolor="#ffffff" |
4437 | + bordercolor="#666666" |
4438 | + borderopacity="1.0" |
4439 | + inkscape:pageopacity="0.0" |
4440 | + inkscape:pageshadow="2" |
4441 | + inkscape:zoom="7.9580786" |
4442 | + inkscape:cx="-7.3730107" |
4443 | + inkscape:cy="9.9678584" |
4444 | + inkscape:document-units="px" |
4445 | + inkscape:current-layer="layer1" |
4446 | + showgrid="false" |
4447 | + fit-margin-top="0" |
4448 | + fit-margin-left="0" |
4449 | + fit-margin-right="0" |
4450 | + fit-margin-bottom="0" /> |
4451 | + <metadata |
4452 | + id="metadata4491"> |
4453 | + <rdf:RDF> |
4454 | + <cc:Work |
4455 | + rdf:about=""> |
4456 | + <dc:format>image/svg+xml</dc:format> |
4457 | + <dc:type |
4458 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
4459 | + <dc:title></dc:title> |
4460 | + </cc:Work> |
4461 | + </rdf:RDF> |
4462 | + </metadata> |
4463 | + <g |
4464 | + inkscape:label="Layer 1" |
4465 | + inkscape:groupmode="layer" |
4466 | + id="layer1" |
4467 | + transform="translate(290.21429,-522.86219)"> |
4468 | + <g |
4469 | + transform="translate(-289.71429,-473.00011)" |
4470 | + id="g4261" |
4471 | + style="opacity:0.5;display:inline"> |
4472 | + <path |
4473 | + id="path4256" |
4474 | + transform="translate(-76.500002,938.36224)" |
4475 | + 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" |
4476 | + 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" |
4477 | + inkscape:connector-curvature="0" /> |
4478 | + <rect |
4479 | + y="995.8623" |
4480 | + x="-0.5000006" |
4481 | + height="19" |
4482 | + width="19" |
4483 | + id="rect4250" |
4484 | + style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
4485 | + </g> |
4486 | + </g> |
4487 | +</svg> |
4488 | |
4489 | === removed file 'resources/minimize_dash_disabled.png' |
4490 | Binary 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 |
4491 | === added file 'resources/minimize_dash_disabled.svg' |
4492 | --- resources/minimize_dash_disabled.svg 1970-01-01 00:00:00 +0000 |
4493 | +++ resources/minimize_dash_disabled.svg 2014-03-03 11:01:22 +0000 |
4494 | @@ -0,0 +1,74 @@ |
4495 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
4496 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
4497 | + |
4498 | +<svg |
4499 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
4500 | + xmlns:cc="http://creativecommons.org/ns#" |
4501 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
4502 | + xmlns:svg="http://www.w3.org/2000/svg" |
4503 | + xmlns="http://www.w3.org/2000/svg" |
4504 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
4505 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
4506 | + width="19" |
4507 | + height="19" |
4508 | + id="svg4486" |
4509 | + version="1.1" |
4510 | + inkscape:version="0.48+devel r" |
4511 | + viewBox="0 0 19 19" |
4512 | + sodipodi:docname="minimize_dash_disabled.svg"> |
4513 | + <defs |
4514 | + id="defs4488" /> |
4515 | + <sodipodi:namedview |
4516 | + id="base" |
4517 | + pagecolor="#ffffff" |
4518 | + bordercolor="#666666" |
4519 | + borderopacity="1.0" |
4520 | + inkscape:pageopacity="0.0" |
4521 | + inkscape:pageshadow="2" |
4522 | + inkscape:zoom="7.9580786" |
4523 | + inkscape:cx="-7.3730107" |
4524 | + inkscape:cy="9.9678584" |
4525 | + inkscape:document-units="px" |
4526 | + inkscape:current-layer="layer1" |
4527 | + showgrid="false" |
4528 | + fit-margin-top="0" |
4529 | + fit-margin-left="0" |
4530 | + fit-margin-right="0" |
4531 | + fit-margin-bottom="0" /> |
4532 | + <metadata |
4533 | + id="metadata4491"> |
4534 | + <rdf:RDF> |
4535 | + <cc:Work |
4536 | + rdf:about=""> |
4537 | + <dc:format>image/svg+xml</dc:format> |
4538 | + <dc:type |
4539 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
4540 | + <dc:title></dc:title> |
4541 | + </cc:Work> |
4542 | + </rdf:RDF> |
4543 | + </metadata> |
4544 | + <g |
4545 | + inkscape:label="Layer 1" |
4546 | + inkscape:groupmode="layer" |
4547 | + id="layer1" |
4548 | + transform="translate(290.21429,-522.86219)"> |
4549 | + <g |
4550 | + transform="translate(-289.71429,-473.00011)" |
4551 | + id="g4261" |
4552 | + style="opacity:0.25;display:inline"> |
4553 | + <path |
4554 | + id="path4256" |
4555 | + transform="translate(-76.500002,938.36224)" |
4556 | + 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" |
4557 | + 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" |
4558 | + inkscape:connector-curvature="0" /> |
4559 | + <rect |
4560 | + y="995.8623" |
4561 | + x="-0.5000006" |
4562 | + height="19" |
4563 | + width="19" |
4564 | + id="rect4250" |
4565 | + style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
4566 | + </g> |
4567 | + </g> |
4568 | +</svg> |
4569 | |
4570 | === removed file 'resources/minimize_dash_prelight.png' |
4571 | Binary 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 |
4572 | === added file 'resources/minimize_dash_prelight.svg' |
4573 | --- resources/minimize_dash_prelight.svg 1970-01-01 00:00:00 +0000 |
4574 | +++ resources/minimize_dash_prelight.svg 2014-03-03 11:01:22 +0000 |
4575 | @@ -0,0 +1,94 @@ |
4576 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
4577 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
4578 | + |
4579 | +<svg |
4580 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
4581 | + xmlns:cc="http://creativecommons.org/ns#" |
4582 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
4583 | + xmlns:svg="http://www.w3.org/2000/svg" |
4584 | + xmlns="http://www.w3.org/2000/svg" |
4585 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
4586 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
4587 | + width="19" |
4588 | + height="19" |
4589 | + id="svg4486" |
4590 | + version="1.1" |
4591 | + inkscape:version="0.48+devel r" |
4592 | + viewBox="0 0 19 19" |
4593 | + sodipodi:docname="minimize_dash_prelight.svg"> |
4594 | + <defs |
4595 | + id="defs4488"> |
4596 | + <filter |
4597 | + inkscape:collect="always" |
4598 | + style="color-interpolation-filters:sRGB" |
4599 | + id="filter4411" |
4600 | + x="-0.12" |
4601 | + width="1.24" |
4602 | + y="-0.12" |
4603 | + height="1.24"> |
4604 | + <feGaussianBlur |
4605 | + inkscape:collect="always" |
4606 | + stdDeviation="0.75" |
4607 | + id="feGaussianBlur4413" /> |
4608 | + </filter> |
4609 | + </defs> |
4610 | + <sodipodi:namedview |
4611 | + id="base" |
4612 | + pagecolor="#ffffff" |
4613 | + bordercolor="#666666" |
4614 | + borderopacity="1.0" |
4615 | + inkscape:pageopacity="0.0" |
4616 | + inkscape:pageshadow="2" |
4617 | + inkscape:zoom="7.9580786" |
4618 | + inkscape:cx="-7.3730107" |
4619 | + inkscape:cy="9.9678584" |
4620 | + inkscape:document-units="px" |
4621 | + inkscape:current-layer="layer1" |
4622 | + showgrid="false" |
4623 | + fit-margin-top="0" |
4624 | + fit-margin-left="0" |
4625 | + fit-margin-right="0" |
4626 | + fit-margin-bottom="0" /> |
4627 | + <metadata |
4628 | + id="metadata4491"> |
4629 | + <rdf:RDF> |
4630 | + <cc:Work |
4631 | + rdf:about=""> |
4632 | + <dc:format>image/svg+xml</dc:format> |
4633 | + <dc:type |
4634 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
4635 | + <dc:title></dc:title> |
4636 | + </cc:Work> |
4637 | + </rdf:RDF> |
4638 | + </metadata> |
4639 | + <g |
4640 | + inkscape:label="Layer 1" |
4641 | + inkscape:groupmode="layer" |
4642 | + id="layer1" |
4643 | + transform="translate(290.21429,-522.86219)"> |
4644 | + <g |
4645 | + style="display:inline" |
4646 | + id="g4265" |
4647 | + transform="translate(-289.71429,-473.00011)"> |
4648 | + <path |
4649 | + 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" |
4650 | + 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" |
4651 | + transform="translate(-76.500002,938.36224)" |
4652 | + id="path4267" |
4653 | + inkscape:connector-curvature="0" /> |
4654 | + <rect |
4655 | + style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
4656 | + id="rect4269" |
4657 | + width="19" |
4658 | + height="19" |
4659 | + x="-0.5000006" |
4660 | + y="995.8623" /> |
4661 | + <path |
4662 | + inkscape:connector-curvature="0" |
4663 | + id="path4409" |
4664 | + transform="translate(-76.500002,938.36224)" |
4665 | + 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" |
4666 | + 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" /> |
4667 | + </g> |
4668 | + </g> |
4669 | +</svg> |
4670 | |
4671 | === removed file 'resources/minimize_dash_pressed.png' |
4672 | Binary 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 |
4673 | === added file 'resources/minimize_dash_pressed.svg' |
4674 | --- resources/minimize_dash_pressed.svg 1970-01-01 00:00:00 +0000 |
4675 | +++ resources/minimize_dash_pressed.svg 2014-03-03 11:01:22 +0000 |
4676 | @@ -0,0 +1,74 @@ |
4677 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
4678 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
4679 | + |
4680 | +<svg |
4681 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
4682 | + xmlns:cc="http://creativecommons.org/ns#" |
4683 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
4684 | + xmlns:svg="http://www.w3.org/2000/svg" |
4685 | + xmlns="http://www.w3.org/2000/svg" |
4686 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
4687 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
4688 | + width="19" |
4689 | + height="19" |
4690 | + id="svg4486" |
4691 | + version="1.1" |
4692 | + inkscape:version="0.48+devel r" |
4693 | + viewBox="0 0 19 19" |
4694 | + sodipodi:docname="minimize_dash_pressed.svg"> |
4695 | + <defs |
4696 | + id="defs4488" /> |
4697 | + <sodipodi:namedview |
4698 | + id="base" |
4699 | + pagecolor="#ffffff" |
4700 | + bordercolor="#666666" |
4701 | + borderopacity="1.0" |
4702 | + inkscape:pageopacity="0.0" |
4703 | + inkscape:pageshadow="2" |
4704 | + inkscape:zoom="7.9580786" |
4705 | + inkscape:cx="-7.3730107" |
4706 | + inkscape:cy="9.9678584" |
4707 | + inkscape:document-units="px" |
4708 | + inkscape:current-layer="layer1" |
4709 | + showgrid="false" |
4710 | + fit-margin-top="0" |
4711 | + fit-margin-left="0" |
4712 | + fit-margin-right="0" |
4713 | + fit-margin-bottom="0" /> |
4714 | + <metadata |
4715 | + id="metadata4491"> |
4716 | + <rdf:RDF> |
4717 | + <cc:Work |
4718 | + rdf:about=""> |
4719 | + <dc:format>image/svg+xml</dc:format> |
4720 | + <dc:type |
4721 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
4722 | + <dc:title></dc:title> |
4723 | + </cc:Work> |
4724 | + </rdf:RDF> |
4725 | + </metadata> |
4726 | + <g |
4727 | + inkscape:label="Layer 1" |
4728 | + inkscape:groupmode="layer" |
4729 | + id="layer1" |
4730 | + transform="translate(290.21429,-522.86219)"> |
4731 | + <g |
4732 | + transform="translate(-289.71429,-473.00011)" |
4733 | + id="g4261" |
4734 | + style="opacity:0.5;display:inline"> |
4735 | + <path |
4736 | + id="path4256" |
4737 | + transform="translate(-76.500002,938.36224)" |
4738 | + 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" |
4739 | + 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" |
4740 | + inkscape:connector-curvature="0" /> |
4741 | + <rect |
4742 | + y="995.8623" |
4743 | + x="-0.5000006" |
4744 | + height="19" |
4745 | + width="19" |
4746 | + id="rect4250" |
4747 | + style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
4748 | + </g> |
4749 | + </g> |
4750 | +</svg> |
4751 | |
4752 | === removed file 'resources/progress_bar_fill.png' |
4753 | Binary 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 |
4754 | === added file 'resources/progress_bar_fill.svg' |
4755 | --- resources/progress_bar_fill.svg 1970-01-01 00:00:00 +0000 |
4756 | +++ resources/progress_bar_fill.svg 2014-03-03 11:01:22 +0000 |
4757 | @@ -0,0 +1,141 @@ |
4758 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
4759 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
4760 | + |
4761 | +<svg |
4762 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
4763 | + xmlns:cc="http://creativecommons.org/ns#" |
4764 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
4765 | + xmlns:svg="http://www.w3.org/2000/svg" |
4766 | + xmlns="http://www.w3.org/2000/svg" |
4767 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
4768 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
4769 | + width="42" |
4770 | + height="4" |
4771 | + id="svg2" |
4772 | + version="1.1" |
4773 | + inkscape:version="0.48.4 r9939" |
4774 | + inkscape:export-filename="/home/marco/Dev/unity/trunk/resources/progress_bar_trough_150.png" |
4775 | + inkscape:export-xdpi="250" |
4776 | + inkscape:export-ydpi="250" |
4777 | + sodipodi:docname="progress_bar_trough.svg"> |
4778 | + <defs |
4779 | + id="defs4"> |
4780 | + <marker |
4781 | + inkscape:stockid="Torso" |
4782 | + orient="auto" |
4783 | + refY="0" |
4784 | + refX="0" |
4785 | + id="Torso" |
4786 | + style="overflow:visible"> |
4787 | + <g |
4788 | + id="g4192" |
4789 | + transform="scale(0.7,0.7)"> |
4790 | + <path |
4791 | + id="path4194" |
4792 | + 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" |
4793 | + style="fill:none;stroke:#000000;stroke-width:1.25" |
4794 | + inkscape:connector-curvature="0" /> |
4795 | + <path |
4796 | + id="path4196" |
4797 | + d="M 4.4598789,0.08866574 C -2.5564571,-4.378332 5.2248769,-3.9061806 -0.84829578,-8.7197331" |
4798 | + style="fill:none;stroke:#000000;stroke-width:1pt" |
4799 | + inkscape:connector-curvature="0" /> |
4800 | + <path |
4801 | + id="path4198" |
4802 | + d="M 4.9298719,0.05752074 C -1.3872731,1.7494689 1.8027579,5.4782079 -4.9448731,7.5462725" |
4803 | + style="fill:none;stroke:#000000;stroke-width:1pt" |
4804 | + inkscape:connector-curvature="0" /> |
4805 | + <rect |
4806 | + id="rect4200" |
4807 | + transform="matrix(0.527536,-0.849533,0.887668,0.460484,0,0)" |
4808 | + y="-1.7408575" |
4809 | + x="-10.391706" |
4810 | + height="2.7608147" |
4811 | + width="2.6366582" |
4812 | + style="fill-rule:evenodd;stroke-width:1pt" /> |
4813 | + <rect |
4814 | + id="rect4202" |
4815 | + transform="matrix(0.671205,-0.741272,0.790802,0.612072,0,0)" |
4816 | + y="-7.9629307" |
4817 | + x="4.9587269" |
4818 | + height="2.8614161" |
4819 | + width="2.7327356" |
4820 | + style="fill-rule:evenodd;stroke-width:1pt" /> |
4821 | + <path |
4822 | + id="path4204" |
4823 | + transform="matrix(0,-1.109517,1.109517,0,25.96648,19.71619)" |
4824 | + 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" |
4825 | + style="fill:#ff0000;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1pt" |
4826 | + inkscape:connector-curvature="0" /> |
4827 | + <path |
4828 | + id="path4206" |
4829 | + transform="matrix(0,-1.109517,1.109517,0,26.8245,16.99126)" |
4830 | + 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" |
4831 | + style="fill:#ff0000;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1pt" |
4832 | + inkscape:connector-curvature="0" /> |
4833 | + </g> |
4834 | + </marker> |
4835 | + <marker |
4836 | + inkscape:stockid="Arrow1Lstart" |
4837 | + orient="auto" |
4838 | + refY="0" |
4839 | + refX="0" |
4840 | + id="Arrow1Lstart" |
4841 | + style="overflow:visible"> |
4842 | + <path |
4843 | + id="path3980" |
4844 | + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" |
4845 | + style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt" |
4846 | + transform="matrix(0.8,0,0,0.8,10,0)" |
4847 | + inkscape:connector-curvature="0" /> |
4848 | + </marker> |
4849 | + </defs> |
4850 | + <sodipodi:namedview |
4851 | + id="base" |
4852 | + pagecolor="#12f82b" |
4853 | + bordercolor="#666666" |
4854 | + borderopacity="1.0" |
4855 | + inkscape:pageopacity="0" |
4856 | + inkscape:pageshadow="2" |
4857 | + inkscape:zoom="7.9195959" |
4858 | + inkscape:cx="47.76404" |
4859 | + inkscape:cy="27.178915" |
4860 | + inkscape:document-units="px" |
4861 | + inkscape:current-layer="layer2" |
4862 | + showgrid="false" |
4863 | + inkscape:window-width="1450" |
4864 | + inkscape:window-height="793" |
4865 | + inkscape:window-x="551" |
4866 | + inkscape:window-y="125" |
4867 | + inkscape:window-maximized="0" /> |
4868 | + <metadata |
4869 | + id="metadata7"> |
4870 | + <rdf:RDF> |
4871 | + <cc:Work |
4872 | + rdf:about=""> |
4873 | + <dc:format>image/svg+xml</dc:format> |
4874 | + <dc:type |
4875 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
4876 | + <dc:title></dc:title> |
4877 | + </cc:Work> |
4878 | + </rdf:RDF> |
4879 | + </metadata> |
4880 | + <g |
4881 | + inkscape:groupmode="layer" |
4882 | + id="layer2" |
4883 | + inkscape:label="Livello" |
4884 | + style="display:inline" |
4885 | + transform="translate(0,-1048.3622)"> |
4886 | + <rect |
4887 | + 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" |
4888 | + id="rect5033" |
4889 | + width="42" |
4890 | + height="4" |
4891 | + x="0" |
4892 | + y="1048.3622" |
4893 | + ry="1.4394673" |
4894 | + inkscape:export-filename="/tmp/progress.png" |
4895 | + inkscape:export-xdpi="90" |
4896 | + inkscape:export-ydpi="90" /> |
4897 | + </g> |
4898 | +</svg> |
4899 | |
4900 | === removed file 'resources/progress_bar_trough.png' |
4901 | Binary 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 |
4902 | === added file 'resources/progress_bar_trough.svg' |
4903 | --- resources/progress_bar_trough.svg 1970-01-01 00:00:00 +0000 |
4904 | +++ resources/progress_bar_trough.svg 2014-03-03 11:01:22 +0000 |
4905 | @@ -0,0 +1,179 @@ |
4906 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
4907 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
4908 | + |
4909 | +<svg |
4910 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
4911 | + xmlns:cc="http://creativecommons.org/ns#" |
4912 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
4913 | + xmlns:svg="http://www.w3.org/2000/svg" |
4914 | + xmlns="http://www.w3.org/2000/svg" |
4915 | + xmlns:xlink="http://www.w3.org/1999/xlink" |
4916 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
4917 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
4918 | + width="54" |
4919 | + height="54" |
4920 | + id="svg2" |
4921 | + version="1.1" |
4922 | + inkscape:version="0.48.4 r9939" |
4923 | + inkscape:export-filename="/home/marco/Dev/unity/trunk/resources/progress_bar_trough_150.png" |
4924 | + inkscape:export-xdpi="250" |
4925 | + inkscape:export-ydpi="250" |
4926 | + sodipodi:docname="progress_bar_trough.svg"> |
4927 | + <defs |
4928 | + id="defs4"> |
4929 | + <marker |
4930 | + inkscape:stockid="Torso" |
4931 | + orient="auto" |
4932 | + refY="0" |
4933 | + refX="0" |
4934 | + id="Torso" |
4935 | + style="overflow:visible"> |
4936 | + <g |
4937 | + id="g4192" |
4938 | + transform="scale(0.7,0.7)"> |
4939 | + <path |
4940 | + id="path4194" |
4941 | + 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" |
4942 | + style="fill:none;stroke:#000000;stroke-width:1.25" |
4943 | + inkscape:connector-curvature="0" /> |
4944 | + <path |
4945 | + id="path4196" |
4946 | + d="M 4.4598789,0.08866574 C -2.5564571,-4.378332 5.2248769,-3.9061806 -0.84829578,-8.7197331" |
4947 | + style="fill:none;stroke:#000000;stroke-width:1pt" |
4948 | + inkscape:connector-curvature="0" /> |
4949 | + <path |
4950 | + id="path4198" |
4951 | + d="M 4.9298719,0.05752074 C -1.3872731,1.7494689 1.8027579,5.4782079 -4.9448731,7.5462725" |
4952 | + style="fill:none;stroke:#000000;stroke-width:1pt" |
4953 | + inkscape:connector-curvature="0" /> |
4954 | + <rect |
4955 | + id="rect4200" |
4956 | + transform="matrix(0.527536,-0.849533,0.887668,0.460484,0,0)" |
4957 | + y="-1.7408575" |
4958 | + x="-10.391706" |
4959 | + height="2.7608147" |
4960 | + width="2.6366582" |
4961 | + style="fill-rule:evenodd;stroke-width:1pt" /> |
4962 | + <rect |
4963 | + id="rect4202" |
4964 | + transform="matrix(0.671205,-0.741272,0.790802,0.612072,0,0)" |
4965 | + y="-7.9629307" |
4966 | + x="4.9587269" |
4967 | + height="2.8614161" |
4968 | + width="2.7327356" |
4969 | + style="fill-rule:evenodd;stroke-width:1pt" /> |
4970 | + <path |
4971 | + id="path4204" |
4972 | + transform="matrix(0,-1.109517,1.109517,0,25.96648,19.71619)" |
4973 | + 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" |
4974 | + style="fill:#ff0000;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1pt" |
4975 | + inkscape:connector-curvature="0" /> |
4976 | + <path |
4977 | + id="path4206" |
4978 | + transform="matrix(0,-1.109517,1.109517,0,26.8245,16.99126)" |
4979 | + 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" |
4980 | + style="fill:#ff0000;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1pt" |
4981 | + inkscape:connector-curvature="0" /> |
4982 | + </g> |
4983 | + </marker> |
4984 | + <marker |
4985 | + inkscape:stockid="Arrow1Lstart" |
4986 | + orient="auto" |
4987 | + refY="0" |
4988 | + refX="0" |
4989 | + id="Arrow1Lstart" |
4990 | + style="overflow:visible"> |
4991 | + <path |
4992 | + id="path3980" |
4993 | + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" |
4994 | + style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt" |
4995 | + transform="matrix(0.8,0,0,0.8,10,0)" |
4996 | + inkscape:connector-curvature="0" /> |
4997 | + </marker> |
4998 | + <filter |
4999 | + inkscape:collect="always" |
5000 | + id="filter6680" |
FAILED: Continuous integration, rev:3726 jenkins. qa.ubuntu. com/job/ unity-ci/ 713/ jenkins. qa.ubuntu. com/job/ unity-trusty- amd64-ci/ 249/console jenkins. qa.ubuntu. com/job/ unity-trusty- armhf-ci/ 245/console jenkins. qa.ubuntu. com/job/ unity-trusty- i386-ci/ 247/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity- ci/713/ rebuild
http://