From efa44c931674e498c39fc59091cf1f8654ac97a5 Mon Sep 17 00:00:00 2001 From: Daniel Teichmann Date: Sun, 1 Aug 2021 01:58:32 +0200 Subject: Fix typos, too long lines, various styling stuff --- src/Toast.qml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/Toast.qml') 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 -- cgit v1.2.3