Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma Mobile
Angelfish
Commits
1ffffe00
Commit
1ffffe00
authored
Feb 23, 2019
by
Jonah Brüchert
Browse files
Calculate tab width from gridUnit
Since we may want to display more than two columns, especially in landscape mode
parent
f9d361ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/contents/ui/Tabs.qml
View file @
1ffffe00
...
...
@@ -38,16 +38,13 @@ Kirigami.ScrollablePage {
title
:
i18n
(
"
Tabs
"
)
property
int
itemHeight
:
Math
.
round
(
itemWidth
/
3
*
2
)
property
int
itemWidth
:
(
width
/
2
)
-
Kirigami
.
Units
.
gridUnit
property
int
itemWidth
:
Kirigami
.
Units
.
gridUnit
*
9
//Rectangle { anchors.fill: parent; color: "brown"; opacity: 0.5; }
GridView
{
//columns: 2
anchors.fill
:
parent
//model: tabs.count +
model
:
tabs
.
model
//model: 4
cellWidth
:
itemWidth
cellHeight
:
itemHeight
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment