diff options
| author | Danilo M. <danix@danix.xyz> | 2026-05-03 10:26:29 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-05-03 10:26:29 +0200 |
| commit | 97ed0956eeb88a8ebe7ff1646dfdaf78c6057a6e (patch) | |
| tree | 13734058e6ce9d9954ad6a4bb38717d889adcd9c /ui | |
| parent | 3ade340c587da09c777f4b3fbb383f550c457c9b (diff) | |
| download | publisher-97ed0956eeb88a8ebe7ff1646dfdaf78c6057a6e.tar.gz publisher-97ed0956eeb88a8ebe7ff1646dfdaf78c6057a6e.zip | |
fix: wire badge into sidebar layout, remove unused QFont/QSizePolicy imports
Diffstat (limited to 'ui')
| -rw-r--r-- | ui/main_window.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/ui/main_window.py b/ui/main_window.py index 9f0594b..cbefa5f 100644 --- a/ui/main_window.py +++ b/ui/main_window.py @@ -1,10 +1,9 @@ from __future__ import annotations from PyQt6.QtWidgets import ( QMainWindow, QWidget, QHBoxLayout, QVBoxLayout, - QLabel, QPushButton, QStackedWidget, QFrame, QSizePolicy, + QLabel, QPushButton, QStackedWidget, QFrame, ) from PyQt6.QtCore import Qt, QFileSystemWatcher -from PyQt6.QtGui import QFont from pathlib import Path from core.config import Config from core.article_scanner import scan_articles @@ -99,9 +98,18 @@ class MainWindow(QMainWindow): section("CONTENUTO") btn("📋 Articoli", "_page_articles") - self._btn_no_trans = btn("⚠️ Senza Traduzione", "_page_no_translation") + + no_trans_row = QHBoxLayout() + no_trans_row.setContentsMargins(0, 0, 0, 0) + self._btn_no_trans = SidebarButton("⚠️ Senza Traduzione") + self._btn_no_trans.clicked.connect(lambda: self._show_page("_page_no_translation", self._btn_no_trans)) + self._btn_group.append(self._btn_no_trans) + no_trans_row.addWidget(self._btn_no_trans, stretch=1) self._badge_no_trans = QLabel("0") self._badge_no_trans.setStyleSheet("background:#3a1a1a;color:#ff6b6b;border-radius:8px;padding:1px 6px;font-size:10px;") + no_trans_row.addWidget(self._badge_no_trans) + layout.addLayout(no_trans_row) + btn("➕ Nuovo articolo", "_page_new_article") btn("🏷 Tassonomia", "_page_taxonomy") btn("🖼 Media", "_page_media") |
