Nux

Merge lp:~azzar1/nux/lp-1050959 into lp:nux

Proposed by Andrea Azzarone
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 818
Merged at revision: 872
Proposed branch: lp:~azzar1/nux/lp-1050959
Merge into: lp:nux
Diff against target: 93 lines (+8/-36)
1 file modified
Nux/ScrollView.cpp (+8/-36)
To merge this branch: bzr merge lp:~azzar1/nux/lp-1050959
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+186745@code.launchpad.net

Commit message

Fix Dash scrollbar so that it does not displace Dash background texture

Description of the change

== Problem ==
Dash scrollbars displace Dash Background texture.

== Test ==
Visual change. N/A

To post a comment you must log in.
lp:~azzar1/nux/lp-1050959 updated
817. By Andrea Azzarone

Remove debug strings.

818. By Andrea Azzarone

Minor change.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Overall it looks good, but there are some bad redraws on mouse over...

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

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Nux/ScrollView.cpp'
2--- Nux/ScrollView.cpp 2013-04-08 14:02:32 +0000
3+++ Nux/ScrollView.cpp 2013-09-20 11:04:38 +0000
4@@ -180,9 +180,6 @@
5
6 Geometry base = GetGeometry();
7
8- if (view_layout_)
9- view_layout_->QueueDraw();
10-
11 GetPainter().PaintBackground(graphics_engine, base);
12
13 if (m_vertical_scrollbar_enable)
14@@ -274,18 +271,10 @@
15 m_ViewX = GetBaseX() + m_border + m_ViewContentLeftMargin;
16 m_ViewY = GetBaseY() + m_top_border + m_ViewContentTopMargin;
17
18- if (m_vertical_scrollbar_enable == false)
19- m_ViewWidth = GetBaseWidth() - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin;
20- else
21- m_ViewWidth = GetBaseWidth() - ScrollBarWidth - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin;
22-
23+ m_ViewWidth = GetBaseWidth() - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin;
24 nuxAssertMsg(m_ViewWidth > 0, "[ScrollView::PreLayoutManagement] Invalid view width: %d", m_ViewWidth);
25
26- if (m_horizontal_scrollbar_enable == false)
27- m_ViewHeight = GetBaseHeight() - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin;
28- else
29- m_ViewHeight = GetBaseHeight() - ScrollBarHeight - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin;
30-
31+ m_ViewHeight = GetBaseHeight() - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin;
32 nuxAssertMsg(m_ViewHeight > 0, "[ScrollView::PreLayoutManagement] Invalid view height: %d", m_ViewHeight);
33
34 if (m_ViewX + _delta_x + m_ViewContentWidth < m_ViewX + m_ViewWidth)
35@@ -372,9 +361,6 @@
36
37 long ScrollView::PostLayoutManagement(long LayoutResult)
38 {
39- int ScrollBarWidth = 0;
40- int ScrollBarHeight = 0;
41-
42 if (view_layout_)
43 {
44 m_ViewContentX = view_layout_->GetBaseX();
45@@ -383,16 +369,10 @@
46 m_ViewContentHeight = view_layout_->GetBaseHeight();
47 }
48
49- if (m_horizontal_scrollbar_enable)
50- ScrollBarHeight = _hscrollbar->GetBaseHeight();
51-
52- if (m_vertical_scrollbar_enable)
53- ScrollBarWidth = _vscrollbar->GetBaseWidth();
54-
55 _hscrollbar->SetContainerSize(GetBaseX() + m_border + m_ViewContentLeftMargin,
56 GetBaseY() + m_top_border + m_ViewContentTopMargin,
57- GetBaseWidth() - ScrollBarWidth - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin,
58- GetBaseHeight() - ScrollBarHeight - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin);
59+ GetBaseWidth() - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin,
60+ GetBaseHeight() - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin);
61
62 if (m_horizontal_scrollbar_enable)
63 {
64@@ -418,8 +398,8 @@
65
66 _vscrollbar->SetContainerSize(GetBaseX() + m_border + m_ViewContentLeftMargin,
67 GetBaseY() + m_top_border + m_ViewContentTopMargin,
68- GetBaseWidth() - ScrollBarWidth - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin,
69- GetBaseHeight() - ScrollBarHeight - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin);
70+ GetBaseWidth() - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin,
71+ GetBaseHeight() - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin);
72
73 if (m_vertical_scrollbar_enable)
74 {
75@@ -470,16 +450,8 @@
76 m_ViewX = GetBaseX() + m_border + m_ViewContentLeftMargin;
77 m_ViewY = GetBaseY() + m_top_border + m_ViewContentTopMargin;
78
79- if (m_vertical_scrollbar_enable == false)
80- m_ViewWidth = GetBaseWidth() - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin;
81- else
82- m_ViewWidth = GetBaseWidth() - w - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin;
83-
84- if (m_horizontal_scrollbar_enable == false)
85- m_ViewHeight = GetBaseHeight() - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin;
86- else
87- m_ViewHeight = GetBaseHeight() - h - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin;
88-
89+ m_ViewWidth = GetBaseWidth() - 2 * m_border - m_ViewContentRightMargin - m_ViewContentLeftMargin;
90+ m_ViewHeight = GetBaseHeight() - m_top_border - m_border - m_ViewContentBottomMargin - m_ViewContentTopMargin;
91
92 if (m_ViewX + _delta_x + m_ViewContentWidth < m_ViewX + m_ViewWidth)
93 {

Subscribers

People subscribed via source and target branches