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
a1951056
Commit
a1951056
authored
4 years ago
by
Nicolas Werner
Browse files
Options
Downloads
Patches
Plain Diff
Reaction and Button layout fixes
parent
e55a0990
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
resources/qml/ImageButton.qml
+1
-7
1 addition, 7 deletions
resources/qml/ImageButton.qml
resources/qml/Reactions.qml
+20
-16
20 additions, 16 deletions
resources/qml/Reactions.qml
with
21 additions
and
23 deletions
resources/qml/ImageButton.qml
+
1
−
7
View file @
a1951056
import
QtQuick
2.3
import
QtQuick
.
Controls
2.3
Button
{
Abstract
Button
{
property
string
image
:
undefined
id
:
button
flat
:
true
// disable background, because we don't want a border on hover
background
:
Item
{
}
Image
{
id
:
buttonImg
// Workaround, can't get icon.source working for now...
...
...
This diff is collapsed.
Click to expand it.
resources/qml/Reactions.qml
+
20
−
16
View file @
a1951056
...
...
@@ -11,48 +11,53 @@ Flow {
Repeater
{
id
:
repeater
Button
{
Abstract
Button
{
id
:
reaction
text
:
model
.
key
hoverEnabled
:
true
implicitWidth
:
contentItem
.
childrenRect
.
width
+
contentItem
.
p
adding
*
2
implicitHeight
:
contentItem
.
childrenRect
.
height
+
contentItem
.
padding
*
2
implicitWidth
:
contentItem
.
childrenRect
.
width
+
contentItem
.
leftP
adding
*
2
implicitHeight
:
contentItem
.
childrenRect
.
height
ToolTip.visible
:
hovered
ToolTip.text
:
model
.
users
contentItem
:
Row
{
anchors.centerIn
:
parent
spacing
:
2
padding
:
4
spacing
:
reactionText
.
implicitHeight
/
4
leftPadding
:
reactionText
.
implicitHeight
/
2
rightPadding
:
reactionText
.
implicitHeight
/
2
TextMetrics
{
id
:
textMetrics
font.family
:
settings
.
emoji_font_family
elide
:
Text
.
ElideRight
elideWidth
:
150
text
:
reaction
.
text
}
Text
{
anchors.baseline
:
reactionCounter
.
baseline
id
:
reactionText
text
:
reaction
.
text
text
:
textMetrics
.
elidedText
+
(
textMetrics
.
elidedText
==
textMetrics
.
text
?
""
:
"
…
"
)
font.family
:
settings
.
emoji_font_family
opacity
:
enabled
?
1.0
:
0.3
color
:
reaction
.
hovered
?
colors
.
highlight
:
colors
.
text
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
elide
:
Text
.
ElideRight
maximumLineCount
:
1
}
Rectangle
{
height
:
reactionText
.
implicitHeight
id
:
divider
height
:
reactionCounter
.
implicitHeight
*
1.4
width
:
1
color
:
reaction
.
hovered
?
colors
.
highlight
:
colors
.
text
}
Text
{
anchors.verticalCenter
:
divider
.
verticalCenter
id
:
reactionCounter
text
:
model
.
counter
font
:
reaction
.
font
opacity
:
enabled
?
1.0
:
0.3
color
:
reaction
.
hovered
?
colors
.
highlight
:
colors
.
text
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
elide
:
Text
.
ElideRight
}
}
...
...
@@ -60,7 +65,6 @@ Flow {
anchors.centerIn
:
parent
implicitWidth
:
reaction
.
implicitWidth
implicitHeight
:
reaction
.
implicitHeight
opacity
:
enabled
?
1
:
0.3
border.color
:
(
reaction
.
hovered
||
model
.
selfReacted
)?
colors
.
highlight
:
colors
.
text
color
:
colors
.
base
border.width
:
1
...
...
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