fix: MSIX warning gets a persistent banner instead of the status bar (#35) #47
@@ -125,6 +125,7 @@ QScrollBar:vertical {{ background: transparent; width: 10px; margin: 2px; }}
|
|||||||
QScrollBar::handle:vertical {{ background: {BORDER}; border-radius: 5px; min-height: 24px; }}
|
QScrollBar::handle:vertical {{ background: {BORDER}; border-radius: 5px; min-height: 24px; }}
|
||||||
QScrollBar::add-line, QScrollBar::sub-line {{ height: 0; }}
|
QScrollBar::add-line, QScrollBar::sub-line {{ height: 0; }}
|
||||||
QLabel#statusbar {{ color: {MUTED}; padding: 4px 2px; }}
|
QLabel#statusbar {{ color: {MUTED}; padding: 4px 2px; }}
|
||||||
|
QLabel#warnBanner {{ color: #1a1205; background: {WARN}; border-radius: 8px; padding: 8px 10px; font-weight: 600; }}
|
||||||
QLabel#section {{ color: {MUTED}; font-weight: 600; font-size: 12px; padding: 2px 2px; }}
|
QLabel#section {{ color: {MUTED}; font-weight: 600; font-size: 12px; padding: 2px 2px; }}
|
||||||
QLabel#sectionDisabled {{ color: {MUTED}; font-weight: 600; font-size: 12px; padding: 2px 2px; }}
|
QLabel#sectionDisabled {{ color: {MUTED}; font-weight: 600; font-size: 12px; padding: 2px 2px; }}
|
||||||
QLabel#placeholder {{ color: {MUTED}; padding: 12px; background: {PANEL_2}; border: 1px dashed {BORDER}; border-radius: 8px; }}
|
QLabel#placeholder {{ color: {MUTED}; padding: 12px; background: {PANEL_2}; border: 1px dashed {BORDER}; border-radius: 8px; }}
|
||||||
@@ -1496,6 +1497,15 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
root.addLayout(self._build_topbar())
|
root.addLayout(self._build_topbar())
|
||||||
|
|
||||||
|
# Persistent warning banner (MSIX-virtualized config, etc.). Lives in
|
||||||
|
# its own widget because the status bar is rewritten on every action,
|
||||||
|
# which used to wipe the warning before the user could read it.
|
||||||
|
self.warn_banner = QLabel("")
|
||||||
|
self.warn_banner.setObjectName("warnBanner")
|
||||||
|
self.warn_banner.setWordWrap(True)
|
||||||
|
self.warn_banner.hide()
|
||||||
|
root.addWidget(self.warn_banner)
|
||||||
|
|
||||||
# User-draggable divider between the server list and the editor.
|
# User-draggable divider between the server list and the editor.
|
||||||
split = QSplitter(Qt.Orientation.Horizontal)
|
split = QSplitter(Qt.Orientation.Horizontal)
|
||||||
split.setChildrenCollapsible(False)
|
split.setChildrenCollapsible(False)
|
||||||
@@ -1770,8 +1780,9 @@ class MainWindow(QMainWindow):
|
|||||||
def _maybe_warn_msix(self):
|
def _maybe_warn_msix(self):
|
||||||
"""
|
"""
|
||||||
Windows-only, no-op everywhere else: if Claude Desktop looks like an
|
Windows-only, no-op everywhere else: if Claude Desktop looks like an
|
||||||
MSIX/Store install with a virtualized config, append a warning to the
|
MSIX/Store install with a virtualized config, show a persistent banner
|
||||||
status bar so edits to the plain %APPDATA% path aren't silently lost.
|
so edits to the plain %APPDATA% path aren't silently lost. (The status
|
||||||
|
bar is the wrong home for this: it's rewritten on every action.)
|
||||||
Defensive on purpose -- this must never block startup or profile load.
|
Defensive on purpose -- this must never block startup or profile load.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
@@ -1779,8 +1790,11 @@ class MainWindow(QMainWindow):
|
|||||||
except Exception:
|
except Exception:
|
||||||
return
|
return
|
||||||
if warning:
|
if warning:
|
||||||
self.status.setText(f"{self.status.text()} ⚠ {warning}")
|
self.warn_banner.setText(f"⚠ {warning}")
|
||||||
self.status.setToolTip(warning)
|
self.warn_banner.setToolTip(warning)
|
||||||
|
self.warn_banner.show()
|
||||||
|
else:
|
||||||
|
self.warn_banner.hide()
|
||||||
|
|
||||||
def add_custom_config(self):
|
def add_custom_config(self):
|
||||||
start = str(core.app_support_base())
|
start = str(core.app_support_base())
|
||||||
|
|||||||
Reference in New Issue
Block a user