Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kaidan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
46
Issues
46
List
Boards
Labels
Service Desk
Milestones
Merge Requests
17
Merge Requests
17
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Network
Kaidan
Commits
4072ce30
Verified
Commit
4072ce30
authored
Jan 08, 2020
by
Melvin Keskin
Committed by
Jonah Brüchert
Jan 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use consistent adaptive buttons
parent
75b2e069
Pipeline
#12970
passed with stages
in 30 minutes and 38 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
106 additions
and
23 deletions
+106
-23
src/qml/AboutDialog.qml
src/qml/AboutDialog.qml
+4
-4
src/qml/LoginPage.qml
src/qml/LoginPage.qml
+7
-19
src/qml/elements/CenteredAdaptiveButton.qml
src/qml/elements/CenteredAdaptiveButton.qml
+49
-0
src/qml/elements/CenteredAdaptiveHighlightedButton.qml
src/qml/elements/CenteredAdaptiveHighlightedButton.qml
+44
-0
src/qml/qml.qrc
src/qml/qml.qrc
+2
-0
No files found.
src/qml/AboutDialog.qml
View file @
4072ce30
...
...
@@ -35,6 +35,8 @@ import org.kde.kirigami 2.8 as Kirigami
import
im
.
kaidan
.
kaidan
1.0
import
"
elements
"
Controls.Dialog
{
id
:
aboutDialog
modal
:
true
...
...
@@ -97,11 +99,9 @@ Controls.Dialog {
horizontalAlignment
:
Qt
.
AlignHCenter
}
C
ontrols.Tool
Button
{
text
:
qsTr
(
"
View source code online
"
)
C
enteredAdaptive
Button
{
label.
text
:
qsTr
(
"
View source code online
"
)
onClicked
:
Qt
.
openUrlExternally
(
Utils
.
applicationSourceCodeUrl
())
Layout.fillWidth
:
true
Layout.alignment
:
Qt
.
AlignHCenter
}
}
}
...
...
src/qml/LoginPage.qml
View file @
4072ce30
...
...
@@ -29,10 +29,10 @@
*/
import
QtQuick
2.7
import
QtQuick
.
Controls
2.3
as
Controls
import
QtQuick
.
Controls
.
Material
2.3
import
QtQuick
.
Layouts
1.3
import
QtQuick
.
Controls
2.3
as
Controls
import
org
.
kde
.
kirigami
2.8
as
Kirigami
import
im
.
kaidan
.
kaidan
1.0
import
"
elements
"
...
...
@@ -94,11 +94,9 @@ Kirigami.Page {
}
// Connect button
Button
{
CenteredAdaptiveHighlighted
Button
{
id
:
connectButton
Layout.fillWidth
:
true
highlighted
:
true
Kirigami.Theme.backgroundColor
:
Material
.
accent
label.text
:
qsTr
(
"
Connect
"
)
state
:
kaidan
.
connectionState
!==
Enums
.
StateDisconnected
?
"
connecting
"
:
""
states
:
[
...
...
@@ -106,13 +104,11 @@ Kirigami.Page {
name
:
"
connecting
"
PropertyChanges
{
target
:
connectButton
label.text
:
"
<i>
"
+
qsTr
(
"
Connecting…
"
)
+
"
</i>
"
label.color
:
"
black
"
label.textFormat
:
Text
.
StyledText
enabled
:
false
}
PropertyChanges
{
target
:
connectLabel
text
:
"
<i>
"
+
qsTr
(
"
Connecting…
"
)
+
"
</i>
"
color
:
"
black
"
}
}
]
...
...
@@ -122,14 +118,6 @@ Kirigami.Page {
kaidan
.
password
=
passField
.
text
kaidan
.
mainConnect
()
}
Controls.Label
{
id
:
connectLabel
anchors.centerIn
:
connectButton
text
:
qsTr
(
"
Connect
"
)
color
:
Kirigami
.
Theme
.
highlightedTextColor
textFormat
:
Text
.
StyledText
}
}
// connect when return was pressed
...
...
src/qml/elements/CenteredAdaptiveButton.qml
0 → 100644
View file @
4072ce30
/*
* Kaidan - A user-friendly XMPP client for every device!
*
* Copyright (C) 2016-2019 Kaidan developers and contributors
* (see the LICENSE file for a full list of copyright authors)
*
* Kaidan is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* In addition, as a special exception, the author of Kaidan gives
* permission to link the code of its release with the OpenSSL
* project's "OpenSSL" library (or with modified versions of it that
* use the same license as the "OpenSSL" library), and distribute the
* linked executables. You must obey the GNU General Public License in
* all respects for all of the code used other than "OpenSSL". If you
* modify this file, you may extend this exception to your version of
* the file, but you are not obligated to do so. If you do not wish to
* do so, delete this exception statement from your version.
*
* Kaidan is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
import
QtQuick
2.7
import
QtQuick
.
Layouts
1.11
import
QtQuick
.
Controls
2.4
as
Controls
/**
* This is a centered button having an adjustable label and fitting its parent's width.
*/
Button
{
property
alias
label
:
label
Layout.alignment
:
Qt
.
AlignHCenter
Layout.fillWidth
:
true
Controls.Label
{
id
:
label
anchors.centerIn
:
parent
textFormat
:
Text
.
PlainText
}
}
src/qml/elements/CenteredAdaptiveHighlightedButton.qml
0 → 100644
View file @
4072ce30
/*
* Kaidan - A user-friendly XMPP client for every device!
*
* Copyright (C) 2016-2019 Kaidan developers and contributors
* (see the LICENSE file for a full list of copyright authors)
*
* Kaidan is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* In addition, as a special exception, the author of Kaidan gives
* permission to link the code of its release with the OpenSSL
* project's "OpenSSL" library (or with modified versions of it that
* use the same license as the "OpenSSL" library), and distribute the
* linked executables. You must obey the GNU General Public License in
* all respects for all of the code used other than "OpenSSL". If you
* modify this file, you may extend this exception to your version of
* the file, but you are not obligated to do so. If you do not wish to
* do so, delete this exception statement from your version.
*
* Kaidan is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
import
QtQuick
.
Controls
.
Material
2.2
as
Material
import
org
.
kde
.
kirigami
2.8
as
Kirigami
/**
* This is a highlighted button.
*
* It is used for main actions.
*/
CenteredAdaptiveButton
{
label.color
:
Kirigami
.
Theme
.
highlightedTextColor
Kirigami.Theme.backgroundColor
:
Material
.
Material
.
accent
highlighted
:
true
}
src/qml/qml.qrc
View file @
4072ce30
...
...
@@ -22,6 +22,8 @@
<file>elements/RoundedImage.qml</file>
<file>elements/RoundImage.qml</file>
<file>elements/Button.qml</file>
<file>elements/CenteredAdaptiveButton.qml</file>
<file>elements/CenteredAdaptiveHighlightedButton.qml</file>
<file>elements/IconButton.qml</file>
<file>elements/FileChooser.qml</file>
<file>elements/FileChooserDesktop.qml</file>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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