Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-client-windows
Commits
ad97faaf
Commit
ad97faaf
authored
Jan 18, 2019
by
Andreas Traczyk
Browse files
ui: fix margins on smartlist items
Change-Id: I3a739291339767de3582d6be880165654b105998
parent
4156fdff
Changes
2
Hide whitespace changes
Inline
Side-by-side
conversationitemdelegate.cpp
View file @
ad97faaf
...
...
@@ -189,7 +189,7 @@ ConversationItemDelegate::paintRingConversationItem(QPainter* painter,
QRect
rectName1
(
rect
.
left
()
+
leftMargin
,
rect
.
top
()
+
topMargin
,
rect
.
width
()
-
leftMargin
-
infoTextWidth_
-
infoTextWidthModifier
-
2
,
rect
.
width
()
-
leftMargin
-
infoTextWidth_
-
infoTextWidthModifier
-
4
,
rect
.
height
()
/
2
-
2
);
QRect
rectName2
(
rectName1
.
left
(),
...
...
@@ -199,7 +199,7 @@ ConversationItemDelegate::paintRingConversationItem(QPainter* painter,
QRect
rectInfo1
(
rectName1
.
left
()
+
rectName1
.
width
(),
rect
.
top
()
+
topMargin
,
infoTextWidth_
-
rightMargin
+
infoTextWidthModifier
,
infoTextWidth_
-
rightMargin
+
infoTextWidthModifier
+
2
,
rect
.
height
()
/
2
-
2
);
QRect
rectInfo2
(
rectInfo1
.
left
(),
...
...
@@ -303,7 +303,12 @@ ConversationItemDelegate::paintRingInviteConversationItem(QPainter* painter,
auto
leftMargin
=
dx_
+
sizeImage_
+
dx_
;
auto
rightMargin
=
dx_
;
if
(
option
.
state
&
QStyle
::
State_MouseOver
)
{
rightMargin
=
infoTextWidth_
-
dx_
*
2
;
auto
scalingRatio
=
MainWindow
::
instance
().
getCurrentScalingRatio
();
if
(
scalingRatio
>
1.0
)
{
rightMargin
=
infoTextWidth_
+
12
-
dx_
*
2
;
}
else
{
rightMargin
=
infoTextWidth_
-
dx_
*
2
;
}
}
auto
topMargin
=
4
;
auto
bottomMargin
=
8
;
...
...
invitebuttonswidget.ui
View file @
ad97faaf
...
...
@@ -6,7 +6,7 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
32
3
</width>
<width>
3
4
2
</width>
<height>
120
</height>
</rect>
</property>
...
...
@@ -107,7 +107,7 @@
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
12
</width>
<width>
8
</width>
<height>
20
</height>
</size>
</property>
...
...
@@ -155,7 +155,7 @@
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
12
</width>
<width>
8
</width>
<height>
20
</height>
</size>
</property>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment