order adjustments
This commit is contained in:
parent
80492ef08c
commit
9f94357acf
@ -22,7 +22,7 @@ class SettingsManager:
|
|||||||
# Hardcoded fallback settings in case files are missing
|
# Hardcoded fallback settings in case files are missing
|
||||||
self.fallback_settings: Dict[str, Any] = {
|
self.fallback_settings: Dict[str, Any] = {
|
||||||
"theme": "dark",
|
"theme": "dark",
|
||||||
"lang": "en",
|
"lang": "fr",
|
||||||
"window_size": {"width": 1000, "height": 600},
|
"window_size": {"width": 1000, "height": 600},
|
||||||
"maximized": False
|
"maximized": False
|
||||||
}
|
}
|
||||||
|
@ -36,82 +36,45 @@ class ThemeManager:
|
|||||||
def get_sheet(self) -> str:
|
def get_sheet(self) -> str:
|
||||||
return f"""
|
return f"""
|
||||||
QWidget {{
|
QWidget {{
|
||||||
background-color: {self.current_theme.get_color("background2")};
|
background-color: {self.current_theme.get_color("background_secondary_color")};
|
||||||
color: {self.current_theme.get_color("font_color")};
|
color: {self.current_theme.get_color("text_color")};
|
||||||
}}
|
}}
|
||||||
#tab_bar {{
|
QLabel {{
|
||||||
background-color: {self.current_theme.get_color("background")};
|
color: {self.current_theme.get_color("text_color")};
|
||||||
|
font-size: 20px;
|
||||||
}}
|
}}
|
||||||
QPushButton {{
|
QPushButton {{
|
||||||
background-color: {self.current_theme.get_color("interactive")};
|
background-color: {self.current_theme.get_color("primary_color")};
|
||||||
color: {self.current_theme.get_color("font_color")};
|
color: {self.current_theme.get_color("text_color")};
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
border: none;
|
border: none;
|
||||||
}}
|
}}
|
||||||
QPushButton:hover {{
|
QPushButton:hover {{
|
||||||
background-color: {self.current_theme.get_color("interactive_hover")};
|
background-color: {self.current_theme.get_color("primary_hover_color")};
|
||||||
}}
|
|
||||||
QLabel {{
|
|
||||||
color: {self.current_theme.get_color("font_color")};
|
|
||||||
font-size: 20px;
|
|
||||||
}}
|
}}
|
||||||
QProgressBar {{
|
QProgressBar {{
|
||||||
border: 1px solid {self.current_theme.get_color("border")};
|
border: 1px solid {self.current_theme.get_color("border_color")};
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
background-color: {self.current_theme.get_color("background2")};
|
background-color: {self.current_theme.get_color("background_secondary_color")};
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: {self.current_theme.get_color("font_color")};
|
color: {self.current_theme.get_color("text_color")};
|
||||||
}}
|
}}
|
||||||
QProgressBar::chunk {{
|
QProgressBar::chunk {{
|
||||||
background-color: {self.current_theme.get_color("interactive")};
|
background-color: {self.current_theme.get_color("primary_color")};
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}}
|
}}
|
||||||
QScrollBar:vertical {{
|
QTextEdit {{
|
||||||
border: none;
|
border: 1px solid {self.current_theme.get_color("border_color")};
|
||||||
background: {self.current_theme.get_color("background3")};
|
border-radius: 8px;
|
||||||
width: 8px;
|
padding: 10px;
|
||||||
margin: 0px;
|
font-size: 14px;
|
||||||
}}
|
background-color: {self.current_theme.get_color("background_secondary_color")};
|
||||||
QScrollBar::handle:vertical {{
|
color: {self.current_theme.get_color("text_color")};
|
||||||
background: {self.current_theme.get_color("interactive")};
|
|
||||||
border-radius: 4px;
|
|
||||||
min-height: 20px;
|
|
||||||
}}
|
|
||||||
QScrollBar::handle:vertical:hover {{
|
|
||||||
background: {self.current_theme.get_color("interactive_hover")};
|
|
||||||
}}
|
|
||||||
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {{
|
|
||||||
border: none;
|
|
||||||
background: none;
|
|
||||||
height: 0px;
|
|
||||||
}}
|
|
||||||
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {{
|
|
||||||
background: none;
|
|
||||||
}}
|
|
||||||
QSlider::groove:horizontal {{
|
|
||||||
border: 1px solid {self.current_theme.get_color("interactive")};
|
|
||||||
height: 10px;
|
|
||||||
background: transparent;
|
|
||||||
border-radius: 5px;
|
|
||||||
}}
|
|
||||||
QSlider::sub-page:horizontal {{
|
|
||||||
background: {self.current_theme.get_color("interactive")};
|
|
||||||
border-radius: 5px;
|
|
||||||
}}
|
|
||||||
QSlider::add-page:horizontal {{
|
|
||||||
background: {self.current_theme.get_color("background3")};
|
|
||||||
border-radius: 5px;
|
|
||||||
}}
|
|
||||||
QSlider::handle:horizontal {{
|
|
||||||
background: white;
|
|
||||||
border: 2px solid {self.current_theme.get_color("interactive")};
|
|
||||||
width: 14px;
|
|
||||||
margin: -4px 0;
|
|
||||||
border-radius: 7px;
|
|
||||||
}}
|
}}
|
||||||
QComboBox {{
|
QComboBox {{
|
||||||
|
border: 2px solid {self.current_theme.get_color("border_color")};
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@ -126,45 +89,70 @@ class ThemeManager:
|
|||||||
padding: 12px 15px;
|
padding: 12px 15px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
min-height: 20px;
|
min-height: 20px;
|
||||||
border: 1px solid {self.current_theme.get_color("border")};
|
border: 1px solid {self.current_theme.get_color("border_color")};
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}}
|
}}
|
||||||
QComboBox QAbstractItemView::item:hover {{
|
QComboBox QAbstractItemView::item:hover {{
|
||||||
background-color: {self.current_theme.get_color("background3")};
|
background-color: {self.current_theme.get_color("background_tertiary_color")};
|
||||||
color: {self.current_theme.get_color("font_color")};
|
color: {self.current_theme.get_color("text_color")};
|
||||||
}}
|
}}
|
||||||
QComboBox QAbstractItemView::item:selected {{
|
QComboBox QAbstractItemView::item:selected {{
|
||||||
color: {self.current_theme.get_color("font_color")};
|
color: {self.current_theme.get_color("text_color")};
|
||||||
}}
|
}}
|
||||||
QTextEdit {{
|
|
||||||
border: 1px solid {self.current_theme.get_color("border")};
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 10px;
|
|
||||||
font-size: 14px;
|
|
||||||
background-color: {self.current_theme.get_color("background2")};
|
|
||||||
color: {self.current_theme.get_color("font_color")};
|
|
||||||
}}
|
|
||||||
QComboBox {{
|
|
||||||
padding: 5px;
|
|
||||||
border-radius: 8px;
|
|
||||||
font-size: 14px;
|
|
||||||
min-height: 30px;
|
|
||||||
}}
|
|
||||||
QComboBox {{
|
|
||||||
border: 2px solid {self.current_theme.get_color("border")};
|
|
||||||
}}
|
|
||||||
|
|
||||||
QComboBox::drop-down {{
|
QComboBox::drop-down {{
|
||||||
border: none;
|
border: none;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
QComboBox::down-arrow {{
|
QComboBox::down-arrow {{
|
||||||
image: none;
|
image: none;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
/* Optionnel: indicateur visuel au hover */
|
|
||||||
QComboBox:hover {{
|
QComboBox:hover {{
|
||||||
border-color: {self.current_theme.get_color("interactive_hover")};
|
border-color: {self.current_theme.get_color("primary_hover_color")};
|
||||||
|
}}
|
||||||
|
QSlider::groove:horizontal {{
|
||||||
|
border: 1px solid {self.current_theme.get_color("primary_color")};
|
||||||
|
height: 10px;
|
||||||
|
background: transparent;
|
||||||
|
border-radius: 5px;
|
||||||
|
}}
|
||||||
|
QSlider::sub-page:horizontal {{
|
||||||
|
background: {self.current_theme.get_color("primary_color")};
|
||||||
|
border-radius: 5px;
|
||||||
|
}}
|
||||||
|
QSlider::add-page:horizontal {{
|
||||||
|
background: {self.current_theme.get_color("background_tertiary_color")};
|
||||||
|
border-radius: 5px;
|
||||||
|
}}
|
||||||
|
QSlider::handle:horizontal {{
|
||||||
|
background: white;
|
||||||
|
border: 2px solid {self.current_theme.get_color("primary_color")};
|
||||||
|
width: 14px;
|
||||||
|
margin: -4px 0;
|
||||||
|
border-radius: 7px;
|
||||||
|
}}
|
||||||
|
QScrollBar:vertical {{
|
||||||
|
border: none;
|
||||||
|
background: {self.current_theme.get_color("background_tertiary_color")};
|
||||||
|
width: 8px;
|
||||||
|
margin: 0px;
|
||||||
|
}}
|
||||||
|
QScrollBar::handle:vertical {{
|
||||||
|
background: {self.current_theme.get_color("primary_color")};
|
||||||
|
border-radius: 4px;
|
||||||
|
min-height: 20px;
|
||||||
|
}}
|
||||||
|
QScrollBar::handle:vertical:hover {{
|
||||||
|
background: {self.current_theme.get_color("primary_hover_color")};
|
||||||
|
}}
|
||||||
|
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {{
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
height: 0px;
|
||||||
|
}}
|
||||||
|
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {{
|
||||||
|
background: none;
|
||||||
|
}}
|
||||||
|
#tab_bar {{
|
||||||
|
background-color: {self.current_theme.get_color("background_color")};
|
||||||
}}
|
}}
|
||||||
"""
|
"""
|
@ -116,13 +116,9 @@ class UpdateManager:
|
|||||||
|
|
||||||
# Gérer l'annulation après la fermeture du fichier
|
# Gérer l'annulation après la fermeture du fichier
|
||||||
if download_cancelled:
|
if download_cancelled:
|
||||||
# Attendre un peu pour s'assurer que le fichier n'est plus utilisé
|
|
||||||
QApplication.processEvents()
|
|
||||||
import time
|
|
||||||
time.sleep(0.1) # Attendre 100ms pour libérer le handle
|
|
||||||
try:
|
try:
|
||||||
if os.path.exists(local_path):
|
if os.path.exists(local_path):
|
||||||
os.remove(local_path)
|
os.remove(local_path, dir_fd=None)
|
||||||
except (OSError, PermissionError):
|
except (OSError, PermissionError):
|
||||||
# Si on ne peut pas supprimer le fichier, on continue sans erreur
|
# Si on ne peut pas supprimer le fichier, on continue sans erreur
|
||||||
pass
|
pass
|
||||||
|
@ -1,34 +1,33 @@
|
|||||||
{
|
{
|
||||||
"lang_name": "English",
|
"lang_name": "English",
|
||||||
"yes": "Yes",
|
|
||||||
"no": "No",
|
|
||||||
"language": "Language :",
|
"language": "Language :",
|
||||||
"settings": "Settings",
|
"settings": "Settings",
|
||||||
"theme": "Theme :",
|
"theme": "Theme :",
|
||||||
"dark_theme": "Dark Theme",
|
"dark_theme": "Dark Theme",
|
||||||
"light_theme": "Light Theme",
|
"light_theme": "Light Theme",
|
||||||
|
"yes": "Yes",
|
||||||
|
"no": "No",
|
||||||
|
"confirmation": "Confirmation",
|
||||||
|
"information": "Information",
|
||||||
|
"close": "Close",
|
||||||
"suggestion_text": "Do you have a question or an idea to improve this application? Send me a message!",
|
"suggestion_text": "Do you have a question or an idea to improve this application? Send me a message!",
|
||||||
"suggestion_placeholder": "Type your message here...",
|
"suggestion_placeholder": "Type your message here...",
|
||||||
"send_suggestion": "Send",
|
"send_suggestion": "Send",
|
||||||
"sending": "Sending...",
|
"sending": "Sending...",
|
||||||
"success": "Success",
|
"success": "Success",
|
||||||
"error": "Error",
|
"error": "Error",
|
||||||
"confirmation": "Confirmation",
|
|
||||||
"suggestion_sent_success": "Your message has been sent successfully!",
|
"suggestion_sent_success": "Your message has been sent successfully!",
|
||||||
"suggestion_send_error": "Error sending message. Try again later.",
|
"suggestion_send_error": "Error sending message. Try again later.",
|
||||||
"email_credentials_error": "Email credentials not or bad configured. Please set your email and password in the .env file.",
|
"email_credentials_error": "Email credentials not or bad configured. Please set your email and password in the .env file.",
|
||||||
"suggestion_too_short": "The message must be at least 15 characters long.",
|
"suggestion_too_short": "The message must be at least 15 characters long.",
|
||||||
"update_found": "New version available: {latest_tag} \nDo you want to install the update?",
|
"update_found": "New version available: {latest_tag} \nDo you want to install the update?",
|
||||||
"choose_update_folder": "Choose destination folder",
|
"choose_update_folder": "Choose destination folder",
|
||||||
|
"downloading_update": "Downloading update...",
|
||||||
"update_downloaded": "Update downloaded to {local_path}",
|
"update_downloaded": "Update downloaded to {local_path}",
|
||||||
"update_download_error": "Error downloading update",
|
"update_download_error": "Error downloading update",
|
||||||
"downloading_update": "Downloading update...",
|
|
||||||
"update": "Update",
|
"update": "Update",
|
||||||
"footer_text": "© 2025 Louis Mazin. All rights reserved.",
|
|
||||||
"details": "Details",
|
|
||||||
"version": "Version",
|
"version": "Version",
|
||||||
|
"details": "Details",
|
||||||
"update_details": "Update Details",
|
"update_details": "Update Details",
|
||||||
"close": "Close",
|
"update_aborted": "Update aborted by user"
|
||||||
"update_aborted": "Update aborted by user",
|
|
||||||
"information": "Information"
|
|
||||||
}
|
}
|
@ -1,34 +1,33 @@
|
|||||||
{
|
{
|
||||||
"lang_name": "Français",
|
"lang_name": "Français",
|
||||||
"yes": "Oui",
|
|
||||||
"no": "Non",
|
|
||||||
"language": "Langue :",
|
"language": "Langue :",
|
||||||
"settings": "Paramètres",
|
"settings": "Paramètres",
|
||||||
"theme": "Thème :",
|
"theme": "Thème :",
|
||||||
"dark_theme": "Thème Sombre",
|
"dark_theme": "Thème Sombre",
|
||||||
"light_theme": "Thème Clair",
|
"light_theme": "Thème Clair",
|
||||||
|
"yes": "Oui",
|
||||||
|
"no": "Non",
|
||||||
|
"confirmation": "Confirmation",
|
||||||
|
"information": "Information",
|
||||||
|
"close": "Fermer",
|
||||||
"suggestion_text": "Vous avez une question ou une idée pour améliorer cette application ? Envoyez-moi un message !",
|
"suggestion_text": "Vous avez une question ou une idée pour améliorer cette application ? Envoyez-moi un message !",
|
||||||
"suggestion_placeholder": "Tapez votre message ici...",
|
"suggestion_placeholder": "Tapez votre message ici...",
|
||||||
"send_suggestion": "Envoyer",
|
"send_suggestion": "Envoyer",
|
||||||
"sending": "Envoi...",
|
"sending": "Envoi...",
|
||||||
"success": "Succès",
|
"success": "Succès",
|
||||||
"error": "Erreur",
|
"error": "Erreur",
|
||||||
"confirmation": "Confirmation",
|
|
||||||
"suggestion_sent_success": "Votre message a été envoyé avec succès !",
|
"suggestion_sent_success": "Votre message a été envoyé avec succès !",
|
||||||
"suggestion_send_error": "Erreur lors de l'envoi du message. Essayez à nouveau plus tard.",
|
"suggestion_send_error": "Erreur lors de l'envoi du message. Essayez à nouveau plus tard.",
|
||||||
"email_credentials_error": "Identifiants de messagerie non ou mal configurés. Veuillez définir votre email et mot de passe dans le fichier .env.",
|
"email_credentials_error": "Identifiants de messagerie non ou mal configurés. Veuillez définir votre email et mot de passe dans le fichier .env.",
|
||||||
"suggestion_too_short": "Le message doit contenir au moins 15 caractères.",
|
"suggestion_too_short": "Le message doit contenir au moins 15 caractères.",
|
||||||
"update_found": "Nouvelle version disponible : {latest_tag} \nVoulez-vous installer la mise à jour ?",
|
"update_found": "Nouvelle version disponible : {latest_tag} \nVoulez-vous installer la mise à jour ?",
|
||||||
"choose_update_folder": "Choisissez le dossier de destination",
|
"choose_update_folder": "Choisissez le dossier de destination",
|
||||||
|
"downloading_update": "Téléchargement de la mise à jour...",
|
||||||
"update_downloaded": "Mise à jour téléchargée dans {local_path}",
|
"update_downloaded": "Mise à jour téléchargée dans {local_path}",
|
||||||
"update_download_error": "Erreur lors du téléchargement de la mise à jour",
|
"update_download_error": "Erreur lors du téléchargement de la mise à jour",
|
||||||
"downloading_update": "Téléchargement de la mise à jour...",
|
|
||||||
"update": "Mise à jour",
|
"update": "Mise à jour",
|
||||||
"footer_text": "© 2025 Louis Mazin. Tous droits réservés.",
|
|
||||||
"details": "Détails",
|
|
||||||
"version": "Version",
|
"version": "Version",
|
||||||
|
"details": "Détails",
|
||||||
"update_details": "Détails de la mise à jour",
|
"update_details": "Détails de la mise à jour",
|
||||||
"close": "Fermer",
|
"update_aborted": "Mise à jour annulée par l'utilisateur"
|
||||||
"update_aborted": "Mise à jour annulée par l'utilisateur",
|
|
||||||
"information": "Information"
|
|
||||||
}
|
}
|
@ -1,16 +1,16 @@
|
|||||||
{
|
{
|
||||||
"theme_name": "dark",
|
"theme_name": "dark",
|
||||||
"colors": {
|
"colors": {
|
||||||
"interactive": "#0A84FF",
|
"background_color": "#212121",
|
||||||
"interactive_hover": "#007AFF",
|
"background_secondary_color": "#2C2C2E",
|
||||||
"border": "#3C3C3E",
|
"background_tertiary_color": "#4A4A4A",
|
||||||
"background": "#212121",
|
"border_color": "#3C3C3E",
|
||||||
"background2": "#2C2C2E",
|
"text_color": "#D1D1D6",
|
||||||
"background3": "#4A4A4A",
|
"primary_color": "#0A84FF",
|
||||||
"font_color": "#D1D1D6",
|
"primary_hover_color": "#007AFF",
|
||||||
"selected_icon": "#D1D1D6",
|
"icon_selected_color": "#D1D1D6",
|
||||||
"unselected_icon": "#4A4A4A",
|
"icon_unselected_color": "#4A4A4A",
|
||||||
"selected_border_icon": "#D1D1D6",
|
"icon_selected_border_color": "#D1D1D6",
|
||||||
"hover_icon": "#D1D1D6"
|
"icon_hover_color": "#D1D1D6"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,16 +1,16 @@
|
|||||||
{
|
{
|
||||||
"theme_name": "light",
|
"theme_name": "light",
|
||||||
"colors": {
|
"colors": {
|
||||||
"interactive": "#0A84FF",
|
"background_color": "#FFFFFF",
|
||||||
"interactive_hover": "#007AFF",
|
"background_secondary_color": "#F5F5F5",
|
||||||
"border": "#1f1f20",
|
"background_tertiary_color": "#E0E0E0",
|
||||||
"background": "#FFFFFF",
|
"border_color": "#1f1f20",
|
||||||
"background2": "#F5F5F5",
|
"text_color": "#000000",
|
||||||
"background3": "#E0E0E0",
|
"primary_color": "#0A84FF",
|
||||||
"font_color": "#000000",
|
"primary_hover_color": "#007AFF",
|
||||||
"selected_icon": "#000000",
|
"icon_selected_color": "#000000",
|
||||||
"unselected_icon": "#5D5A5A",
|
"icon_unselected_color": "#5D5A5A",
|
||||||
"selected_border_icon": "#000000",
|
"icon_selected_border_color": "#000000",
|
||||||
"hover_icon": "#000000"
|
"icon_hover_color": "#000000"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user