Skip to content

Commit

Permalink
Proper Styling to TOC
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaopengLin authored and kelson42 committed Nov 13, 2024
1 parent 7311ac0 commit 418f3e4
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 1 deletion.
58 changes: 58 additions & 0 deletions resources/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,64 @@ ContentTypeFilter {
height: 0;
}

#tableofcontentbar {
background-color: white;
}

#tableofcontentbar QTreeWidget,
#tableofcontentbar QLabel,
#tableofcontentbar QFrame {
background-color: white;
}

#tableofcontentbar QTreeWidget {
outline: none;
}

#tableofcontentbar QTreeWidget::item {
height: 26px;
padding: 0px 10px;
outline: none;
border-top: 1px solid transparent;
border-bottom: 1px solid transparent;
}

#tableofcontentbar QTreeWidget::item:selected,
#tableofcontentbar QTreeWidget::item:hover {
outline: none;
border-top: 1px solid #3366CC;
border-bottom: 1px solid #3366CC;
background-color: #D9E9FF;
color: black;
}

#tableofcontentbar QTreeWidget::branch:selected,
#tableofcontentbar QTreeWidget::branch:hover {
outline: none;
border-top: 1px solid #3366CC;
border-bottom: 1px solid #3366CC;
background-color: #D9E9FF;
}

#tableofcontentbar QTreeWidget::branch {
image: none;
}

#tableofcontentbar #titleLabel {
padding: 0px;
margin: 10px;
}

#tableofcontentbar #hideLabel {
margin: 13px 10px 10px; /* 3px to match bottom with titleLabel */
}

#tableofcontentbar QScrollBar {
width: 5px;
border: none;
outline: none;
}

#tableofcontentbar QScrollBar::handle {
background-color: grey;
}
11 changes: 10 additions & 1 deletion src/tableofcontentbar.ui
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
Expand All @@ -44,6 +47,9 @@
<property name="text">
<string/>
</property>
<property name="indent">
<number>0</number>
</property>
</widget>
</item>
<item>
Expand All @@ -64,6 +70,9 @@
<property name="text">
<string/>
</property>
<property name="indent">
<number>0</number>
</property>
</widget>
</item>
</layout>
Expand All @@ -90,7 +99,7 @@
<enum>QAbstractScrollArea::AdjustToContents</enum>
</property>
<property name="textElideMode">
<enum>Qt::ElideNone</enum>
<enum>Qt::ElideRight</enum>
</property>
<property name="indentation">
<number>30</number>
Expand Down

0 comments on commit 418f3e4

Please sign in to comment.