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
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")