Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-client-windows
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-client-windows
Commits
f7add23a
Commit
f7add23a
authored
Jun 7, 2019
by
Andreas Traczyk
Browse files
Options
Downloads
Patches
Plain Diff
settings: fix auto update string and custom toggleswitch margins
Change-Id: Ib9aec88b5b2e857c76c06fc096e2fa41d0e3d8ed
parent
4c87947d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
settingswidget.ui
+4
-1
4 additions, 1 deletion
settingswidget.ui
toggleswitch.cpp
+2
-4
2 additions, 4 deletions
toggleswitch.cpp
with
6 additions
and
5 deletions
settingswidget.ui
+
4
−
1
View file @
f7add23a
...
...
@@ -959,6 +959,9 @@
</item>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_16"
>
<property
name=
"spacing"
>
<number>
14
</number>
</property>
<property
name=
"leftMargin"
>
<number>
20
</number>
</property>
...
...
@@ -1005,7 +1008,7 @@
<string>
Toggle automatic updates
</string>
</property>
<property
name=
"text"
stdset=
"0"
>
<string>
Check for updates automatically
every
</string>
<string>
Check for updates automatically
</string>
</property>
<property
name=
"checked"
stdset=
"0"
>
<bool>
true
</bool>
...
...
This diff is collapsed.
Click to expand it.
toggleswitch.cpp
+
2
−
4
View file @
f7add23a
...
...
@@ -28,7 +28,7 @@ ToggleSwitch::ToggleSwitch(QWidget *parent)
switch_
(
false
),
margin_
(
3
),
thumb_
(
"#d5d5d5"
),
textMargin_
(
24
),
textMargin_
(
18
),
anim_
(
new
QPropertyAnimation
(
this
,
"offset"
,
this
)),
style_
(
SwitchStyle
::
UWP
)
{
...
...
@@ -55,8 +55,6 @@ void ToggleSwitch::paintEvent(QPaintEvent *e)
{
Q_UNUSED
(
e
);
QPainter
p
(
this
);
//p.setOpacity(isEnabled() ? (switch_ ? 0.5 : 0.38) : 0.12);
//p.setOpacity(isEnabled() ? 1.0 : 0.12);
p
.
setOpacity
(
isEnabled
()
?
(
switch_
?
1.0
:
0.5
)
:
0.12
);
p
.
setRenderHint
(
QPainter
::
Antialiasing
,
true
);
...
...
@@ -98,7 +96,7 @@ void ToggleSwitch::paintEvent(QPaintEvent *e)
}
p
.
setOpacity
(
1.0
);
p
.
setPen
(
isEnabled
()
?
Qt
::
black
:
Qt
::
gray
);
p
.
drawText
(
width_
+
textMargin_
,
height_
-
margin_
,
text_
);
p
.
drawText
(
width_
+
textMargin_
,
height_
-
margin_
-
1
,
text_
);
}
void
ToggleSwitch
::
mouseReleaseEvent
(
QMouseEvent
*
e
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment