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
PIM
Itinerary
Commits
6c0fb343
Commit
6c0fb343
authored
Feb 08, 2019
by
Volker Krause
Browse files
Fix aspect ratio for 1D barcodes
parent
4908b5f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/app/TicketTokenDelegate.qml
View file @
6c0fb343
...
...
@@ -18,6 +18,7 @@
import
QtQuick
2.5
import
QtQuick
.
Layouts
1.1
import
QtQuick
.
Controls
2.1
as
QQC2
import
QtQuick
.
Window
2.10
import
org
.
kde
.
kirigami
2.0
as
Kirigami
import
org
.
kde
.
prison
1.0
as
Prison
import
org
.
kde
.
kitinerary
1.0
...
...
@@ -61,9 +62,9 @@ ColumnLayout {
anchors.top
:
barcodeContainer
.
top
anchors.bottom
:
barcodeContainer
.
bottom
color
:
"
white
"
property
bool
is1dCode
:
currentTicket
.
ticketTokenType
==
Ticket
.
Code128
implicitWidth
:
Math
.
max
(
root
.
width
*
0.8
,
barcode
.
implicitWidth
+
barcode
.
anchors
.
margins
*
2
)
// ### we assume aspect ratio 1:1 here, which is correct for QR and Aztec only
implicitHeight
:
visible
?
implicitWidth
:
0
implicitHeight
:
visible
?
is1dCode
?
Screen
.
pixelDensity
*
25
:
implicitWidth
:
0
visible
:
barcode
.
implicitHeight
>
0
MouseArea
{
...
...
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