MCPcopy Create free account
hub / github.com/alpha-liu-01/SpeedyNote / applyStyle

Method applyStyle

source/ui/sidebars/NotesTreePanel.cpp:90–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90void NotesTreePanel::applyStyle()
91{
92 if (!m_tree) return;
93 // Background matches the rest of the dark markdown sidebar (#2d2d2d).
94 const QString bg = m_darkMode ? QStringLiteral("#2d2d2d") : QStringLiteral("#F5F5F5");
95 const QString rev = m_darkMode ? QStringLiteral("_reversed") : QString();
96 m_tree->setStyleSheet(QStringLiteral(R"(
97 QTreeWidget {
98 background-color: %1;
99 border: none;
100 outline: none;
101 }
102 QTreeWidget::branch {
103 background-color: %1;
104 }
105 QTreeWidget::branch:has-children:!has-siblings:closed,
106 QTreeWidget::branch:closed:has-children:has-siblings {
107 border-image: none;
108 image: url(:/resources/icons/right_arrow%2.png);
109 }
110 QTreeWidget::branch:open:has-children:!has-siblings,
111 QTreeWidget::branch:open:has-children:has-siblings {
112 border-image: none;
113 image: url(:/resources/icons/down_arrow%2.png);
114 }
115 )").arg(bg, rev));
116}
117
118// ============================================================================
119// setOutline — the core rebuild entry point.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected