fix style
This commit is contained in:
parent
66b7479abb
commit
8f8d7c1b26
@ -49,14 +49,6 @@ class ThemeManager:
|
|||||||
QPushButton:hover {{
|
QPushButton:hover {{
|
||||||
background-color: #007AFF;
|
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 {{
|
QLabel {{
|
||||||
color: {self.current_theme.get_color("font_color")};
|
color: {self.current_theme.get_color("font_color")};
|
||||||
}}
|
}}
|
||||||
@ -133,12 +125,14 @@ class ThemeManager:
|
|||||||
QComboBox QAbstractItemView {{
|
QComboBox QAbstractItemView {{
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
|
outline: none;
|
||||||
}}
|
}}
|
||||||
QComboBox QAbstractItemView::item {{
|
QComboBox QAbstractItemView::item {{
|
||||||
padding: 12px 15px;
|
padding: 12px 15px;
|
||||||
border: none;
|
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
min-height: 20px;
|
min-height: 20px;
|
||||||
|
border: 1px solid {self.current_theme.get_color("border")};
|
||||||
|
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("background3")};
|
||||||
@ -147,4 +141,12 @@ class ThemeManager:
|
|||||||
QComboBox QAbstractItemView::item:selected {{
|
QComboBox QAbstractItemView::item:selected {{
|
||||||
color: {self.current_theme.get_color("font_color")};
|
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")};
|
||||||
|
}}
|
||||||
"""
|
"""
|
@ -85,24 +85,28 @@ class MainWindow(QMainWindow):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def setup_ui(self) -> None:
|
def setup_ui(self) -> None:
|
||||||
self.side_menu = TabsWidget(self, MenuDirection.HORIZONTAL, 70, None, 10, 1, BorderSide.TOP)
|
central_widget = QFrame(self)
|
||||||
|
layout = QVBoxLayout(central_widget)
|
||||||
|
layout.setContentsMargins(0, 0, 0, 0)
|
||||||
|
|
||||||
self.settings_window = SettingsWindow(self)
|
self.side_menu = TabsWidget(self, MenuDirection.HORIZONTAL, 70, None, 10, 1, BorderSide.TOP)
|
||||||
self.side_menu.add_widget(self.settings_window, "", paths.get_asset_svg_path("settings"), position=ButtonPosition.CENTER)
|
|
||||||
|
|
||||||
self.suggestion_window = SuggestionWindow(self)
|
self.suggestion_window = SuggestionWindow(self)
|
||||||
self.side_menu.add_widget(self.suggestion_window, "", paths.get_asset_svg_path("suggestion"), position=ButtonPosition.CENTER)
|
self.side_menu.add_widget(self.suggestion_window, "", paths.get_asset_svg_path("suggestion"), position=ButtonPosition.CENTER)
|
||||||
|
|
||||||
# Ajout du footer
|
self.settings_window = SettingsWindow(self)
|
||||||
central_widget = QFrame(self)
|
self.side_menu.add_widget(self.settings_window, "", paths.get_asset_svg_path("settings"), position=ButtonPosition.CENTER)
|
||||||
layout = QVBoxLayout(central_widget)
|
|
||||||
layout.addWidget(self.side_menu)
|
layout.addWidget(self.side_menu)
|
||||||
|
|
||||||
|
|
||||||
self.footer_label = QLabel(self.language_manager.get_text("footer_text"), self)
|
self.footer_label = QLabel(self.language_manager.get_text("footer_text"), self)
|
||||||
self.footer_label.setAlignment(Qt.AlignmentFlag.AlignRight)
|
self.footer_label.setAlignment(Qt.AlignmentFlag.AlignRight)
|
||||||
self.footer_label.setStyleSheet("padding: 5px; font-size: 12px; color: gray;")
|
self.footer_label.setStyleSheet("padding: 5px; font-size: 12px; color: gray;")
|
||||||
|
|
||||||
layout.addWidget(self.footer_label)
|
layout.addWidget(self.footer_label)
|
||||||
|
|
||||||
|
|
||||||
self.setCentralWidget(central_widget)
|
self.setCentralWidget(central_widget)
|
||||||
|
|
||||||
def update_theme(self) -> None:
|
def update_theme(self) -> None:
|
||||||
|
@ -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 PyQt6.QtCore import Qt
|
||||||
from app.core.main_manager import MainManager, NotificationType
|
from app.core.main_manager import MainManager, NotificationType
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
@ -29,6 +29,8 @@ class SettingsWindow(QWidget):
|
|||||||
layout.setSpacing(20)
|
layout.setSpacing(20)
|
||||||
layout.setContentsMargins(20, 20, 20, 20)
|
layout.setContentsMargins(20, 20, 20, 20)
|
||||||
|
|
||||||
|
layout.addStretch()
|
||||||
|
|
||||||
self.language_layout = QHBoxLayout()
|
self.language_layout = QHBoxLayout()
|
||||||
# Paramètres de langue
|
# Paramètres de langue
|
||||||
self.languageLabel = QLabel(self.language_manager.get_text("language"),self)
|
self.languageLabel = QLabel(self.language_manager.get_text("language"),self)
|
||||||
@ -40,6 +42,8 @@ class SettingsWindow(QWidget):
|
|||||||
|
|
||||||
layout.addLayout(self.language_layout)
|
layout.addLayout(self.language_layout)
|
||||||
|
|
||||||
|
layout.addStretch()
|
||||||
|
|
||||||
# Paramètres de thème
|
# Paramètres de thème
|
||||||
self.theme_layout = QHBoxLayout()
|
self.theme_layout = QHBoxLayout()
|
||||||
|
|
||||||
@ -53,7 +57,6 @@ class SettingsWindow(QWidget):
|
|||||||
layout.addLayout(self.theme_layout)
|
layout.addLayout(self.theme_layout)
|
||||||
|
|
||||||
layout.addStretch()
|
layout.addStretch()
|
||||||
|
|
||||||
def createLanguageSelector(self) -> QComboBox:
|
def createLanguageSelector(self) -> QComboBox:
|
||||||
combo: QComboBox = QComboBox()
|
combo: QComboBox = QComboBox()
|
||||||
# Ajouter toutes les langues disponibles
|
# Ajouter toutes les langues disponibles
|
||||||
|
@ -87,7 +87,6 @@ class SuggestionWindow(QWidget):
|
|||||||
# Text area for suggestion
|
# Text area for suggestion
|
||||||
self.text_edit: QTextEdit = QTextEdit(self)
|
self.text_edit: QTextEdit = QTextEdit(self)
|
||||||
self.text_edit.setPlaceholderText(self.language_manager.get_text("suggestion_placeholder"))
|
self.text_edit.setPlaceholderText(self.language_manager.get_text("suggestion_placeholder"))
|
||||||
self.text_edit.setMinimumHeight(200)
|
|
||||||
layout.addWidget(self.text_edit)
|
layout.addWidget(self.text_edit)
|
||||||
|
|
||||||
# Button layout
|
# Button layout
|
||||||
@ -100,7 +99,6 @@ class SuggestionWindow(QWidget):
|
|||||||
button_layout.addWidget(self.send_button)
|
button_layout.addWidget(self.send_button)
|
||||||
|
|
||||||
layout.addLayout(button_layout)
|
layout.addLayout(button_layout)
|
||||||
layout.addStretch()
|
|
||||||
|
|
||||||
def send_suggestion(self) -> None:
|
def send_suggestion(self) -> None:
|
||||||
message: str = self.text_edit.toPlainText().strip()
|
message: str = self.text_edit.toPlainText().strip()
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"theme_name": "dark",
|
"theme_name": "dark",
|
||||||
"colors": {
|
"colors": {
|
||||||
|
"border": "#3C3C3E",
|
||||||
"background": "#212121",
|
"background": "#212121",
|
||||||
"background2": "#2C2C2E",
|
"background2": "#2C2C2E",
|
||||||
"background3": "#4A4A4A",
|
"background3": "#4A4A4A",
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"theme_name": "light",
|
"theme_name": "light",
|
||||||
"colors": {
|
"colors": {
|
||||||
|
"border": "#1f1f20",
|
||||||
"background": "#FFFFFF",
|
"background": "#FFFFFF",
|
||||||
"background2": "#F5F5F5",
|
"background2": "#F5F5F5",
|
||||||
"background3": "#E0E0E0",
|
"background3": "#E0E0E0",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user