fix style

This commit is contained in:
Louis Mazin 2025-09-07 13:09:26 +02:00
parent 66b7479abb
commit 8f8d7c1b26
6 changed files with 30 additions and 21 deletions

View File

@ -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")};
}}
"""

View File

@ -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:

View File

@ -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

View File

@ -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()

View File

@ -1,6 +1,7 @@
{
"theme_name": "dark",
"colors": {
"border": "#3C3C3E",
"background": "#212121",
"background2": "#2C2C2E",
"background3": "#4A4A4A",

View File

@ -1,6 +1,7 @@
{
"theme_name": "light",
"colors": {
"border": "#1f1f20",
"background": "#FFFFFF",
"background2": "#F5F5F5",
"background3": "#E0E0E0",