diff options
author | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2021-08-01 01:58:32 +0200 |
---|---|---|
committer | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2021-08-01 01:58:32 +0200 |
commit | efa44c931674e498c39fc59091cf1f8654ac97a5 (patch) | |
tree | 6fa2a949f680c5abcd7d919164ad9c5c8c1fa66c /src/Toast.qml | |
parent | 18c2b837d33c040a21f84c444d8c554769f1dc58 (diff) | |
download | RWA.Support.DesktopApp-efa44c931674e498c39fc59091cf1f8654ac97a5.tar.gz RWA.Support.DesktopApp-efa44c931674e498c39fc59091cf1f8654ac97a5.tar.bz2 RWA.Support.DesktopApp-efa44c931674e498c39fc59091cf1f8654ac97a5.zip |
Fix typos, too long lines, various styling stuff
Diffstat (limited to 'src/Toast.qml')
-rw-r--r-- | src/Toast.qml | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Toast.qml b/src/Toast.qml index 60e238c..0de53a9 100644 --- a/src/Toast.qml +++ b/src/Toast.qml @@ -36,7 +36,8 @@ import QtQuick.Controls.Material 2.3 */ /** - * @brief An Android-like timed message text in a box that self-destroys when finished if desired + * @brief An Android-like timed message text in + * a box that self-destroys when finished if desired */ Control { @@ -52,16 +53,18 @@ Control { */ function show(text, duration) { message.text = text; - if (typeof duration !== "undefined") { // checks if parameter was passed + + // checks if parameter was passed + if (typeof duration !== "undefined") { time = Math.max(duration, 2 * fadeTime); - } - else { + } else { time = defaultTime; } animation.start(); } - property bool selfDestroying: false // whether this Toast will self-destroy when it is finished + // whether this Toast will self-destroy when it is finished + property bool selfDestroying: false /** * Private |