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
59ba48a3
Commit
59ba48a3
authored
Jan 04, 2019
by
Andreas Traczyk
Browse files
ui: font size and button margin fixes
Change-Id: I604a0f2422808a1476027f01e3c8d92b3b485a18
parent
421509c7
Changes
7
Hide whitespace changes
Inline
Side-by-side
callwidget.cpp
View file @
59ba48a3
...
...
@@ -261,7 +261,8 @@ CallWidget::navigated(bool to)
}
}
void
CallWidget
::
updateCustomUI
()
void
CallWidget
::
updateCustomUI
()
{
auto
scalingRatio
=
MainWindow
::
instance
().
getCurrentScalingRatio
();
if
(
scalingRatio
>
1.0
)
{
...
...
callwidget.ui
View file @
59ba48a3
...
...
@@ -7,7 +7,7 @@
<x>
0
</x>
<y>
0
</y>
<width>
1350
</width>
<height>
6
57
</height>
<height>
6
64
</height>
</rect>
</property>
<property
name=
"sizePolicy"
>
...
...
@@ -1645,10 +1645,16 @@ Copy and share it with your friends!
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
60
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
16777215
</height>
<height>
60
</height>
</size>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_10"
>
...
...
@@ -1656,13 +1662,13 @@ Copy and share it with your friends!
<number>
6
</number>
</property>
<property
name=
"leftMargin"
>
<number>
1
0
</number>
<number>
1
4
</number>
</property>
<property
name=
"topMargin"
>
<number>
6
</number>
</property>
<property
name=
"rightMargin"
>
<number>
1
0
</number>
<number>
1
4
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
6
</number>
...
...
@@ -1735,9 +1741,9 @@ Copy and share it with your friends!
</property>
<property
name=
"font"
>
<font>
<pointsize>
1
0
</pointsize>
<weight>
7
5
</weight>
<bold>
tru
e
</bold>
<pointsize>
1
1
</pointsize>
<weight>
5
0
</weight>
<bold>
fals
e
</bold>
</font>
</property>
<property
name=
"styleSheet"
>
...
...
conversationitemdelegate.cpp
View file @
59ba48a3
...
...
@@ -174,6 +174,7 @@ ConversationItemDelegate::paintRingConversationItem(QPainter* painter,
infoText2HeightModifier
=
2
;
}
else
{
font
.
setPointSize
(
fontSize_
);
infoTextWidthModifier
=
10
;
}
auto
leftMargin
=
dx_
+
sizeImage_
+
dx_
;
...
...
currentaccountcombobox.cpp
View file @
59ba48a3
...
...
@@ -153,10 +153,12 @@ void CurrentAccountComboBox::resizeEvent(QResizeEvent* event)
void
CurrentAccountComboBox
::
setupSettingsButton
()
{
gearPoint_
.
setX
(
this
->
width
()
-
gearSize_
-
4
*
gearBorder_
+
2
);
gearPoint_
.
setX
(
this
->
width
()
-
gearSize_
-
5
*
gearBorder_
-
1
);
gearPoint_
.
setY
(
this
->
height
()
/
2
-
gearLabel_
.
height
()
/
2
-
2
*
gearBorder_
+
4.5
);
gearLabel_
.
setGeometry
(
gearPoint_
.
x
()
-
3
,
gearPoint_
.
y
(),
gearSize_
+
2
*
gearBorder_
,
gearSize_
+
2
*
gearBorder_
);
gearLabel_
.
setGeometry
(
gearPoint_
.
x
(),
gearPoint_
.
y
(),
gearSize_
+
2
*
gearBorder_
,
gearSize_
+
2
*
gearBorder_
);
gearLabel_
.
setMargin
(
gearBorder_
);
}
...
...
mainwindow.cpp
View file @
59ba48a3
...
...
@@ -281,7 +281,6 @@ MainWindow::closeEvent(QCloseEvent* event)
settings
.
setValue
(
SettingsKey
::
geometry
,
saveGeometry
());
settings
.
setValue
(
SettingsKey
::
windowState
,
saveState
());
}
this
->
disconnect
(
activeChangedConnection_
);
this
->
disconnect
(
screenChangedConnection_
);
QMainWindow
::
closeEvent
(
event
);
}
...
...
@@ -342,17 +341,7 @@ MainWindow::show()
disconnect
(
screenChangedConnection_
);
screenChangedConnection_
=
connect
(
windowHandle
(),
&
QWindow
::
screenChanged
,
this
,
&
MainWindow
::
slotScreenChanged
);
disconnect
(
activeChangedConnection_
);
activeChangedConnection_
=
connect
(
windowHandle
(),
&
QWindow
::
activeChanged
,
[
this
]()
{
auto
screenNumber
=
qApp
->
desktop
()
->
screenNumber
();
windowHandle
()
->
setScreen
(
nullptr
);
QScreen
*
screen
=
qApp
->
screens
().
at
(
screenNumber
);
windowHandle
()
->
setScreen
(
screen
);
});
auto
screenNumber
=
qApp
->
desktop
()
->
screenNumber
();
QScreen
*
screen
=
qApp
->
screens
().
at
(
screenNumber
);
currentScalingRatio_
=
screen
->
logicalDotsPerInchX
()
/
96
;
currentScalingRatio_
=
1.0
;
qobject_cast
<
NavWidget
*>
(
ui
->
navStack
->
currentWidget
())
->
updateCustomUI
();
}
...
...
mainwindow.h
View file @
59ba48a3
...
...
@@ -80,12 +80,11 @@ private:
ScreenEnum
lastScr_
;
int
lastAccountCount_
;
Qt
::
WindowFlags
flags_
;
float
currentScalingRatio_
=
1.0
;
float
currentScalingRatio_
;
void
readSettingsFromRegistry
();
Ui
::
MainWindow
*
ui
;
QNetworkConfigurationManager
netManager_
;
QMetaObject
::
Connection
screenChangedConnection_
;
QMetaObject
::
Connection
activeChangedConnection_
;
};
settingswidget.ui
View file @
59ba48a3
...
...
@@ -117,7 +117,7 @@
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
9
</number>
<number>
14
</number>
</property>
<item>
<spacer
name=
"horizontalSpacer_8"
>
...
...
@@ -1087,7 +1087,7 @@ QPushButton:pressed {background: rgb(230,230, 230); border: 0px; border-radius:
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
69
6
</width>
<width>
69
1
</width>
<height>
647
</height>
</rect>
</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