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
57 lines
2.1 KiB
XML
57 lines
2.1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<interface>
|
|
<requires lib="gtk" version="4.0"/>
|
|
<requires lib="libadwaita" version="1.0"/>
|
|
|
|
<template class="IconPickerDialog" parent="AdwDialog">
|
|
<property name="title">Choose Icon</property>
|
|
<property name="content-width">400</property>
|
|
<property name="content-height">450</property>
|
|
|
|
<child>
|
|
<object class="AdwToolbarView">
|
|
<child type="top">
|
|
<object class="AdwHeaderBar">
|
|
<property name="show-title">true</property>
|
|
</object>
|
|
</child>
|
|
|
|
<property name="content">
|
|
<object class="GtkScrolledWindow">
|
|
<property name="vexpand">true</property>
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="orientation">vertical</property>
|
|
<property name="margin-start">12</property>
|
|
<property name="margin-end">12</property>
|
|
<property name="margin-top">12</property>
|
|
<property name="margin-bottom">12</property>
|
|
<property name="spacing">12</property>
|
|
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="label">Select an icon for your project:</property>
|
|
<property name="xalign">0</property>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkFlowBox" id="icon_flowbox">
|
|
<property name="column-spacing">6</property>
|
|
<property name="row-spacing">6</property>
|
|
<property name="homogeneous">true</property>
|
|
<property name="max-children-per-line">6</property>
|
|
<property name="min-children-per-line">6</property>
|
|
<property name="selection-mode">single</property>
|
|
<signal name="child-activated" handler="on_icon_selected"/>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
</template>
|
|
</interface>
|