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