Skip to content

Commit

Permalink
Add empty events page
Browse files Browse the repository at this point in the history
  • Loading branch information
zkovari committed Aug 13, 2023
1 parent 2feaf15 commit e0eb122
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/main/python/plotlyst/view/novel_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def __init__(self, novel: Novel):
self.ui = Ui_NovelView()
self.ui.setupUi(self.widget)

self.ui.btnEvents.setIcon(IconRegistry.from_name('ri.mind-map', color='white'))
self.ui.btnStructure.setIcon(IconRegistry.story_structure_icon(color='white'))
self.ui.btnPlot.setIcon(IconRegistry.plot_icon(color='white'))
self.ui.btnSynopsis.setIcon(IconRegistry.from_name('fa5s.scroll', 'white'))
Expand Down Expand Up @@ -121,12 +122,13 @@ def __init__(self, novel: Novel):

self.ui.wdgTagsContainer.setNovel(self.novel)

link_buttons_to_pages(self.ui.stackedWidget, [(self.ui.btnStructure, self.ui.pageStructure),
link_buttons_to_pages(self.ui.stackedWidget, [(self.ui.btnEvents, self.ui.pageEvents),
(self.ui.btnStructure, self.ui.pageStructure),
(self.ui.btnPlot, self.ui.pagePlot),
(self.ui.btnSynopsis, self.ui.pageSynopsis),
(self.ui.btnTags, self.ui.pageTags),
(self.ui.btnSettings, self.ui.pageSettings)])
self.ui.btnStructure.setChecked(True)
self.ui.btnEvents.setChecked(True)

for btn in self.ui.buttonGroup.buttons():
btn.installEventFilter(OpacityEventFilter(parent=btn, leaveOpacity=0.7, ignoreCheckedButton=True))
Expand Down
2 changes: 2 additions & 0 deletions src/main/python/plotlyst/view/style/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@
border-radius: 6px;
color: white;
padding: 2px;
padding-left: 4px;
padding-right: 4px;
font: bold;
}
QPushButton:disabled[top-level-nav=true] {
Expand Down
100 changes: 96 additions & 4 deletions ui/novel_view.ui
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<number>9</number>
</property>
<property name="topMargin">
<number>20</number>
<number>10</number>
</property>
<property name="bottomMargin">
<number>0</number>
Expand Down Expand Up @@ -162,6 +162,34 @@
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="btnEvents">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="text">
<string>Events</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="base" stdset="0">
<bool>false</bool>
</property>
<property name="top-level-nav" stdset="0">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnStructure">
<property name="sizePolicy">
Expand All @@ -174,7 +202,7 @@
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="text">
<string>Story structure</string>
<string>Structure</string>
</property>
<property name="checkable">
<bool>true</bool>
Expand Down Expand Up @@ -333,7 +361,7 @@
<item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>3</number>
<number>4</number>
</property>
<widget class="QWidget" name="pageStructure">
<layout class="QVBoxLayout" name="verticalLayout_4">
Expand Down Expand Up @@ -595,7 +623,7 @@
<x>0</x>
<y>0</y>
<width>642</width>
<height>455</height>
<height>453</height>
</rect>
</property>
<property name="sizePolicy">
Expand All @@ -609,6 +637,70 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="pageEvents">
<layout class="QVBoxLayout" name="verticalLayout_6">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QSplitter" name="splitterEvents">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QWidget" name="wdgEventsMapParent" native="true">
<layout class="QVBoxLayout" name="verticalLayout_7">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget>
<widget class="QWidget" name="wdgEventsSidebar" native="true">
<layout class="QVBoxLayout" name="verticalLayout_10">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="pageSettings">
<layout class="QVBoxLayout" name="verticalLayout_5">
<property name="spacing">
Expand Down

0 comments on commit e0eb122

Please sign in to comment.