summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2025-05-29 22:27:38 +0200
committerPapoteur <papoteur@mageia.org>2025-05-29 22:27:38 +0200
commitb8f9fef53bff28c3248b2b4818ce8c4dd1bf5a31 (patch)
tree724d1dcb864a3d2319e906423d3f606688d7fe80
parent9182afc06fbda1c6533afe5221a71408f619f165 (diff)
downloadmageiawelcome-b8f9fef53bff28c3248b2b4818ce8c4dd1bf5a31.tar
mageiawelcome-b8f9fef53bff28c3248b2b4818ce8c4dd1bf5a31.tar.gz
mageiawelcome-b8f9fef53bff28c3248b2b4818ce8c4dd1bf5a31.tar.bz2
mageiawelcome-b8f9fef53bff28c3248b2b4818ce8c4dd1bf5a31.tar.xz
mageiawelcome-b8f9fef53bff28c3248b2b4818ce8c4dd1bf5a31.zip
Animate pushbutton for links
-rw-r--r--src/ui.py27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/ui.py b/src/ui.py
index 78fbfd2..a78773c 100644
--- a/src/ui.py
+++ b/src/ui.py
@@ -1,5 +1,6 @@
import sys
import os
+import time
import pwd
from PyQt6.QtWidgets import (
QApplication,
@@ -50,6 +51,7 @@ from helpers import (
Autostart,
)
from AppList import AppList
+from version import version
DEFAULT_WIDTH = 900
_ = QApplication.translate
@@ -58,6 +60,7 @@ _ = QApplication.translate
class Commands():
def weblink(self, url):
webbrowser.open_new_tab(url)
+ time.sleep(.5)
def command(self, app):
print(f"Lancement de {app}")
@@ -258,7 +261,14 @@ class Links(SlidePage):
button.setAlignment(Qt.AlignmentFlag.AlignCenter)
button.setWordWrap(True)
button.setStyleSheet(
- "color: white; font-size: 18px; padding: 2px 8px; font-weight: bold;"
+ """
+ QLabel {
+ color: white; font-size: 18px; padding: 2px 8px; font-weight: bold;
+ }
+ QLabel:pressed {
+ background-color: lightgrey; font-size: 18px; padding: 2px 8px; font-weight: bold;
+ }
+ """
)
layout.addWidget(button, 0, col)
col += 1
@@ -800,12 +810,14 @@ class Configuration(SlidePage):
message = QMessageBox(
QMessageBox.Icon.Warning,
_("Configuration", "About Mageiawelcome"),
- #: %1 will be replaced with the release number, %2 with author's names
- _("Configuration", "Release %1<br />Authors : %2")
- % (version.version, "Daniel Napora, Papoteur, Antony Baker<br />"),
+ #: {0} will be replaced with the release number, {1} with author's names
+ _("Configuration", "Release {0}<br />Authors : {1}").format(
+ version,
+ "Daniel Napora, Papoteur, Antony Baker<br />"
+ ),
)
#: Replace with the list of translator's names
- messaget.setDetailedText(
+ message.setDetailedText(
_("Configuration", "Translators: English is the source language")
)
message.exec()
@@ -1004,7 +1016,10 @@ class MyPushButton(QPushButton):
self.setStyleSheet(
"""
QWidget {background-color: lightgray; border-radius: 5px; padding: 8px 8px;}
- QLabel {font-size: 18px;}
+ QPushButton {font-size: 14px;}
+ QPushButton:pressed {
+ background-color: white;
+ }
"""
)