diff --git a/app/core/theme_manager.py b/app/core/theme_manager.py index a753c30..2c850ad 100644 --- a/app/core/theme_manager.py +++ b/app/core/theme_manager.py @@ -49,14 +49,6 @@ class ThemeManager: QPushButton:hover {{ background-color: #007AFF; }} - QLineEdit {{ - border: 1px solid #3C3C3E; - border-radius: 8px; - padding: 10px; - font-size: 14px; - background-color: {self.current_theme.get_color("background2")}; - color: {self.current_theme.get_color("font_color")}; - }} QLabel {{ color: {self.current_theme.get_color("font_color")}; }} @@ -133,12 +125,14 @@ class ThemeManager: QComboBox QAbstractItemView {{ border-radius: 8px; padding: 0px; + outline: none; }} QComboBox QAbstractItemView::item {{ padding: 12px 15px; - border: none; margin: 0px; min-height: 20px; + border: 1px solid {self.current_theme.get_color("border")}; + border-radius: 8px; }} QComboBox QAbstractItemView::item:hover {{ background-color: {self.current_theme.get_color("background3")}; @@ -147,4 +141,12 @@ class ThemeManager: QComboBox QAbstractItemView::item:selected {{ color: {self.current_theme.get_color("font_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")}; + }} """ \ No newline at end of file diff --git a/app/ui/main_window.py b/app/ui/main_window.py index 077b1e6..c5b5b0a 100644 --- a/app/ui/main_window.py +++ b/app/ui/main_window.py @@ -85,24 +85,28 @@ class MainWindow(QMainWindow): pass def setup_ui(self) -> None: + central_widget = QFrame(self) + layout = QVBoxLayout(central_widget) + layout.setContentsMargins(0, 0, 0, 0) + self.side_menu = TabsWidget(self, MenuDirection.HORIZONTAL, 70, None, 10, 1, BorderSide.TOP) - - self.settings_window = SettingsWindow(self) - self.side_menu.add_widget(self.settings_window, "", paths.get_asset_svg_path("settings"), position=ButtonPosition.CENTER) self.suggestion_window = SuggestionWindow(self) self.side_menu.add_widget(self.suggestion_window, "", paths.get_asset_svg_path("suggestion"), position=ButtonPosition.CENTER) - # Ajout du footer - central_widget = QFrame(self) - layout = QVBoxLayout(central_widget) - layout.addWidget(self.side_menu) + self.settings_window = SettingsWindow(self) + self.side_menu.add_widget(self.settings_window, "", paths.get_asset_svg_path("settings"), position=ButtonPosition.CENTER) + layout.addWidget(self.side_menu) + + self.footer_label = QLabel(self.language_manager.get_text("footer_text"), self) self.footer_label.setAlignment(Qt.AlignmentFlag.AlignRight) self.footer_label.setStyleSheet("padding: 5px; font-size: 12px; color: gray;") + layout.addWidget(self.footer_label) + self.setCentralWidget(central_widget) def update_theme(self) -> None: diff --git a/app/ui/windows/settings_window.py b/app/ui/windows/settings_window.py index c2cd628..6057509 100644 --- a/app/ui/windows/settings_window.py +++ b/app/ui/windows/settings_window.py @@ -1,4 +1,4 @@ -from PyQt6.QtWidgets import QWidget, QVBoxLayout, QComboBox, QLabel, QHBoxLayout +from PyQt6.QtWidgets import QWidget, QVBoxLayout, QComboBox, QLabel, QHBoxLayout, QSizePolicy from PyQt6.QtCore import Qt from app.core.main_manager import MainManager, NotificationType from typing import Optional @@ -29,6 +29,8 @@ class SettingsWindow(QWidget): layout.setSpacing(20) layout.setContentsMargins(20, 20, 20, 20) + layout.addStretch() + self.language_layout = QHBoxLayout() # Paramètres de langue self.languageLabel = QLabel(self.language_manager.get_text("language"),self) @@ -40,6 +42,8 @@ class SettingsWindow(QWidget): layout.addLayout(self.language_layout) + layout.addStretch() + # Paramètres de thème self.theme_layout = QHBoxLayout() @@ -51,9 +55,8 @@ class SettingsWindow(QWidget): self.theme_layout.addWidget(self.themeCombo) layout.addLayout(self.theme_layout) - + layout.addStretch() - def createLanguageSelector(self) -> QComboBox: combo: QComboBox = QComboBox() # Ajouter toutes les langues disponibles diff --git a/app/ui/windows/suggestion_window.py b/app/ui/windows/suggestion_window.py index ff342d5..c418e2d 100644 --- a/app/ui/windows/suggestion_window.py +++ b/app/ui/windows/suggestion_window.py @@ -87,7 +87,6 @@ class SuggestionWindow(QWidget): # Text area for suggestion self.text_edit: QTextEdit = QTextEdit(self) self.text_edit.setPlaceholderText(self.language_manager.get_text("suggestion_placeholder")) - self.text_edit.setMinimumHeight(200) layout.addWidget(self.text_edit) # Button layout @@ -100,7 +99,6 @@ class SuggestionWindow(QWidget): button_layout.addWidget(self.send_button) layout.addLayout(button_layout) - layout.addStretch() def send_suggestion(self) -> None: message: str = self.text_edit.toPlainText().strip() diff --git a/data/themes/dark.json b/data/themes/dark.json index 62fed6c..b90e08b 100644 --- a/data/themes/dark.json +++ b/data/themes/dark.json @@ -1,6 +1,7 @@ { "theme_name": "dark", "colors": { + "border": "#3C3C3E", "background": "#212121", "background2": "#2C2C2E", "background3": "#4A4A4A", diff --git a/data/themes/light.json b/data/themes/light.json index 165d998..9b6aa63 100644 --- a/data/themes/light.json +++ b/data/themes/light.json @@ -1,6 +1,7 @@ { "theme_name": "light", "colors": { + "border": "#1f1f20", "background": "#FFFFFF", "background2": "#F5F5F5", "background3": "#E0E0E0",