Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New empty events page #662

Merged
merged 2 commits into from
Aug 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
105 changes: 100 additions & 5 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 @@ -594,8 +622,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>642</width>
<height>455</height>
<width>100</width>
<height>30</height>
</rect>
</property>
<property name="sizePolicy">
Expand All @@ -609,6 +637,73 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="pageEvents">
<property name="relaxed-white-bg" stdset="0">
<bool>true</bool>
</property>
<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
Loading