Merge lp:~azzar1/unity/fix-856277 into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Brandon Schaefer
Approved revision: 2689
Merged at revision: 2697
Proposed branch: lp:~azzar1/unity/fix-856277
Merge into: lp:unity
Diff against target: 47 lines (+6/-2)
2 files modified
dash/FilterBasicButton.cpp (+2/-1)
unity-shared/DashStyle.cpp (+4/-1)
To merge this branch: bzr merge lp:~azzar1/unity/fix-856277
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
Review via email: mp+124270@code.launchpad.net

Commit message

Reduce internal-padding inside filter buttons.

To post a comment you must log in.
Revision history for this message
Andrea Azzarone (azzar1) wrote :

== Problem ==
Bug #856277: Lens button set narrow width which is needed

== Fix ==
Reduce internal padding. 5 px should be ok. Replacing 'All' with 'XXXXX' (read bug description) I no longer get XX...

== Test ==
Visual change. Not applicable.

Revision history for this message
Andrea Azzarone (azzar1) wrote :

> == Problem ==
> Bug #856277: Lens button set narrow width which is needed
>
> == Fix ==
> Reduce internal padding. 5 px should be ok. Replacing 'All' with 'XXXXX' (read
> bug description) I no longer get XX...
>
> == Test ==
> Visual change. Not applicable.

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

Since this is a visual change does this need a UIFe? Even though it is a small change...

Revision history for this message
Andrea Azzarone (azzar1) wrote :

Yep it's a visual change, but it's a bug fix. I don't think it needs a UIFe.

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

Alright, changes look good then :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dash/FilterBasicButton.cpp'
2--- dash/FilterBasicButton.cpp 2012-08-06 15:39:20 +0000
3+++ dash/FilterBasicButton.cpp 2012-09-13 17:48:18 +0000
4@@ -26,6 +26,7 @@
5 {
6 const int kMinButtonHeight = 30;
7 const int kMinButtonWidth = 48;
8+const int kFontSize = 11;
9 }
10
11 namespace unity
12@@ -100,7 +101,7 @@
13
14 void FilterBasicButton::RedrawTheme(nux::Geometry const& geom, cairo_t* cr, nux::ButtonVisualState faked_state)
15 {
16- Style::Instance().Button(cr, faked_state, label_, -1, Alignment::CENTER, true);
17+ Style::Instance().Button(cr, faked_state, label_, kFontSize, Alignment::CENTER, true);
18 }
19
20 void FilterBasicButton::RedrawFocusOverlay(nux::Geometry const& geom, cairo_t* cr)
21
22=== modified file 'unity-shared/DashStyle.cpp'
23--- unity-shared/DashStyle.cpp 2012-08-20 19:59:54 +0000
24+++ unity-shared/DashStyle.cpp 2012-09-13 17:48:18 +0000
25@@ -58,6 +58,7 @@
26 nux::logging::Logger logger("unity.dash");
27
28 Style* style_instance = nullptr;
29+
30 const int STATES = 5;
31
32 // These cairo overrides may also be reused somewhere...
33@@ -1585,11 +1586,13 @@
34 pimpl->button_label_overlay_mode_[state],
35 pimpl->button_label_blur_size_[state] * 0.75);
36
37+ static double internal_padding = 5.0f;
38+
39 pimpl->Text(cr,
40 pimpl->button_label_text_color_[state],
41 label,
42 font_size,
43- 11.0, // 15px = 11pt
44+ internal_padding,
45 alignment);
46
47 return true;