Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
nheko
Commits
e40dab9f
Commit
e40dab9f
authored
7 years ago
by
Konstantinos Sideris
Browse files
Options
Downloads
Patches
Plain Diff
Improve settings menu layout
parent
b586a232
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/UserSettingsPage.h
+7
-2
7 additions, 2 deletions
include/UserSettingsPage.h
src/UserSettingsPage.cc
+12
-2
12 additions, 2 deletions
src/UserSettingsPage.cc
with
19 additions
and
4 deletions
include/UserSettingsPage.h
+
7
−
2
View file @
e40dab9f
...
...
@@ -25,8 +25,9 @@
class
Toggle
;
constexpr
int
OptionMargin
=
6
;
constexpr
int
LayoutSideMargin
=
300
;
constexpr
int
OptionMargin
=
6
;
constexpr
int
LayoutTopMargin
=
50
;
constexpr
int
LayoutBottomMargin
=
LayoutTopMargin
;
class
UserSettings
{
...
...
@@ -63,6 +64,7 @@ public:
protected:
void
showEvent
(
QShowEvent
*
event
)
override
;
void
resizeEvent
(
QResizeEvent
*
event
)
override
;
signals:
void
moveBack
();
...
...
@@ -71,6 +73,7 @@ signals:
private:
// Layouts
QVBoxLayout
*
topLayout_
;
QVBoxLayout
*
mainLayout_
;
QHBoxLayout
*
topBarLayout_
;
// Shared settings object.
...
...
@@ -78,4 +81,6 @@ private:
Toggle
*
trayToggle_
;
QComboBox
*
themeCombo_
;
int
sideMargin_
=
0
;
};
This diff is collapsed.
Click to expand it.
src/UserSettingsPage.cc
+
12
−
2
View file @
e40dab9f
...
...
@@ -107,10 +107,10 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge
general_
->
setFont
(
QFont
(
"Open Sans Bold"
,
17
));
general_
->
setStyleSheet
(
"color: #5d6565"
);
auto
mainLayout_
=
new
QVBoxLayout
;
mainLayout_
=
new
QVBoxLayout
;
mainLayout_
->
setSpacing
(
7
);
mainLayout_
->
setContentsMargins
(
LayoutS
ideMargin
,
Layout
Side
Margin
/
6
,
LayoutS
ideMargin
,
Layout
Side
Margin
/
6
);
s
ideMargin
_
,
Layout
Top
Margin
,
s
ideMargin
_
,
Layout
Bottom
Margin
);
mainLayout_
->
addWidget
(
general_
,
1
,
Qt
::
AlignLeft
|
Qt
::
AlignVCenter
);
mainLayout_
->
addWidget
(
new
HorizontalLine
(
this
));
mainLayout_
->
addLayout
(
trayOptionLayout_
);
...
...
@@ -143,3 +143,13 @@ UserSettingsPage::showEvent(QShowEvent *)
themeCombo_
->
setCurrentIndex
((
settings_
->
theme
()
==
"default"
?
0
:
1
));
trayToggle_
->
setState
(
!
settings_
->
isTrayEnabled
());
// Treats true as "off"
}
void
UserSettingsPage
::
resizeEvent
(
QResizeEvent
*
event
)
{
sideMargin_
=
width
()
*
0.2
;
mainLayout_
->
setContentsMargins
(
sideMargin_
,
LayoutTopMargin
,
sideMargin_
,
LayoutBottomMargin
);
QWidget
::
resizeEvent
(
event
);
}
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