Implement a collapsible sidebar that can be folded to show just project icons in a slim strip, or expanded to show full project details. Projects can now have custom icons selected from a 6x6 grid of 36 symbolic icons. Features: - Foldable sidebar with toggle button (fold/unfold) - Slim sidebar view showing only project icons when folded - Custom project icons with 36 symbolic icon choices - Icon picker dialog with 6x6 grid layout - Edit Project dialog (renamed from Rename) with name and icon selection - Project icons displayed in both full and slim sidebar views - Smooth transitions between folded/unfolded states - Click on slim project icon to unfold sidebar Technical changes: - Add icon field to Project model with default "folder-symbolic" - Create constants.py with PROJECT_ICONS list (36 symbolic icons) - Implement IconPickerDialog with grid layout and selection - Create SlimProjectItem widget for folded sidebar view - Update ProjectManager.update_project() to handle icon changes - Restructure sidebar using GtkStack for full/slim view switching - Update project-item.ui to display project icon - Change "Rename" menu to "Edit Project" with icon picker - Add fold/unfold buttons with sidebar-show icons - Update build system with new files and resources
87 lines
2.5 KiB
XML
87 lines
2.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<interface>
|
|
<requires lib="gtk" version="4.0"/>
|
|
<requires lib="libadwaita" version="1.0"/>
|
|
|
|
<menu id="project_menu">
|
|
<section>
|
|
<item>
|
|
<attribute name="label">Add Request</attribute>
|
|
<attribute name="action">project.add-request</attribute>
|
|
</item>
|
|
<item>
|
|
<attribute name="label">Edit Project</attribute>
|
|
<attribute name="action">project.edit</attribute>
|
|
</item>
|
|
<item>
|
|
<attribute name="label">Delete</attribute>
|
|
<attribute name="action">project.delete</attribute>
|
|
</item>
|
|
</section>
|
|
</menu>
|
|
|
|
<template class="ProjectItem" parent="GtkBox">
|
|
<property name="orientation">vertical</property>
|
|
<property name="spacing">0</property>
|
|
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="orientation">horizontal</property>
|
|
<property name="spacing">6</property>
|
|
<property name="margin-start">6</property>
|
|
<property name="margin-end">6</property>
|
|
<property name="margin-top">6</property>
|
|
<property name="margin-bottom">6</property>
|
|
|
|
<child>
|
|
<object class="GtkImage" id="expand_icon">
|
|
<property name="icon-name">go-next-symbolic</property>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkImage" id="project_icon">
|
|
<property name="icon-name">folder-symbolic</property>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkLabel" id="name_label">
|
|
<property name="xalign">0</property>
|
|
<property name="hexpand">True</property>
|
|
<style>
|
|
<class name="heading"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkMenuButton">
|
|
<property name="icon-name">view-more-symbolic</property>
|
|
<property name="menu-model">project_menu</property>
|
|
<style>
|
|
<class name="flat"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkRevealer" id="requests_revealer">
|
|
<property name="reveal-child">False</property>
|
|
<property name="transition-type">slide-down</property>
|
|
|
|
<child>
|
|
<object class="GtkListBox" id="requests_listbox">
|
|
<property name="margin-start">24</property>
|
|
<style>
|
|
<class name="navigation-sidebar"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</template>
|
|
</interface>
|