Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
168 changes: 111 additions & 57 deletions crates/rnote-ui/data/ui/penssidebar/shaperpage.ui
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<interface>
<template class="RnShaperPage" parent="GtkWidget">
<property name="layout-manager">
Expand Down Expand Up @@ -36,6 +36,17 @@
</style>
</object>
</child>
<child>
<object class="GtkMenuButton" id="shaperextra_menubutton">
<property name="icon-name">misc-menu-symbolic</property>
<property name="direction">left</property>
<property name="tooltip_text" translatable="yes">Shaper Extra</property>
<property name="popover">shaperextra_popover</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
<child>
Expand Down Expand Up @@ -126,35 +137,6 @@
</object>
</child>

<!-- Highlighting -->
<child>
<object class="AdwPreferencesGroup">
<property name="title" translatable="yes">Highlighting</property>
<child>
<object class="AdwSwitchRow" id="highlight_mode_row">
<property name="title" translatable="yes">Highlight-Mode</property>
<property name="subtitle" translatable="yes">Fade active color</property>
</object>
</child>
<child>
<object class="AdwSpinRow" id="highlight_opacity_row">
<property name="title" translatable="yes">Highlight-Opacity</property>
<property name="subtitle" translatable="yes">Modify the highlight opacity (%)</property>
<property name="adjustment">
<object class="GtkAdjustment">
<property name="lower">0</property>
<property name="upper">100</property>
<property name="value">50</property>
<property name="step-increment">1</property>
</object>
</property>
<property name="numeric">true</property>
<property name="digits">0</property>
</object>
</child>
</object>
</child>

<!-- Smooth options -->
<child>
<object class="AdwPreferencesGroup" id="smoothstyle_group">
Expand Down Expand Up @@ -234,49 +216,121 @@
</child>
</object>
</child>
</object>
</child>
</object>

<!-- Constraints -->
<!-- Shaper Extra -->
<object class="GtkPopover" id="shaperextra_popover">
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="margin-start">6</property>
<property name="margin-end">6</property>
<property name="spacing">12</property>
<property name="width-request">300</property>
<child>
<object class="AdwPreferencesGroup">
<property name="title" translatable="yes">Constraints</property>
<object class="GtkBox">
<child>
<object class="GtkListBox">
<property name="width-request">300</property>
<property name="selection-mode">none</property>
<object class="GtkLabel">
<property name="label" translatable="yes">Shaper Extra</property>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about a simple

Shape Configuration (2/2)

and adding a (1/2) on the first page.

Though at that point a next/previous page navigation makes more sense.

Maybe a nagivation view can work inside of the popover ? https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1.7/class.NavigationView.html

<property name="hexpand">true</property>
<property name="halign">center</property>
<style>
<class name="content" />
<class name="medium" />
<class name="title-3" />
</style>
<child>
<object class="AdwSwitchRow" id="constraint_enabled_row">
<property name="title" translatable="yes">Enabled</property>
<property name="subtitle" translatable="yes">Hold Ctrl to temporarily enable/disable
constraints when this switch is off/on</property>
</object>
</child>
<child>
<object class="AdwSwitchRow" id="constraint_one_to_one_row">
<property name="title" translatable="yes">1:1</property>
</object>
</child>
<child>
<object class="AdwSwitchRow" id="constraint_three_to_two_row">
<property name="title" translatable="yes">3:2</property>
</object>
</child>
<child>
<object class="GtkButton" id="shaperextra_popover_close_button">
<property name="icon-name">window-close-symbolic</property>
<style>
<class name="flat" />
<class name="circular" />
</style>
</object>
</child>
</object>
</child>

<!-- Highlighting -->
<child>
<object class="AdwPreferencesGroup">
<property name="title" translatable="yes">Highlighting</property>
<child>
<object class="AdwSwitchRow" id="highlight_mode_row">
<property name="title" translatable="yes">Highlight-Mode</property>
<property name="subtitle" translatable="yes">Fade active color</property>
</object>
</child>
<child>
<object class="AdwSpinRow" id="highlight_opacity_row">
<property name="title" translatable="yes">Highlight-Opacity</property>
<property name="subtitle" translatable="yes">Modify the highlight opacity (%)</property>
<property name="adjustment">
<object class="GtkAdjustment">
<property name="lower">0</property>
<property name="upper">100</property>
<property name="value">50</property>
<property name="step-increment">1</property>
</object>
</child>
</property>
<property name="numeric">true</property>
<property name="digits">0</property>
</object>
</child>

<!-- Constraints -->
<child>
<object class="AdwPreferencesGroup">
<property name="title" translatable="yes">Constraints</property>
<child>
<object class="AdwSwitchRow" id="constraint_golden_row">
<property name="title" translatable="yes">Golden Ratio (1:1.618)</property>
<object class="GtkListBox">
<property name="width-request">300</property>
<property name="selection-mode">none</property>
<style>
<class name="content" />
<class name="medium" />
</style>
<child>
<object class="AdwSwitchRow" id="constraint_enabled_row">
<property name="title" translatable="yes">Enabled</property>
<property name="subtitle" translatable="yes">Hold Ctrl to temporarily enable/disable
constraints when this switch is off/on</property>
</object>
</child>
<child>
<object class="AdwSwitchRow" id="constraint_one_to_one_row">
<property name="title" translatable="yes">1:1</property>
</object>
</child>
<child>
<object class="AdwSwitchRow" id="constraint_three_to_two_row">
<property name="title" translatable="yes">3:2</property>
</object>
</child>
<child>
<object class="AdwSwitchRow" id="constraint_golden_row">
<property name="title" translatable="yes">Golden Ratio (1:1.618)</property>
</object>
</child>
</object>
</child>
</object>
</child>

</object>
</child>
</object>
</child>
</object>





<!-- Shape builder type -->
<object class="GtkPopover" id="shapebuildertype_popover">
<child>
Expand Down Expand Up @@ -319,4 +373,4 @@ constraints when this switch is off/on</property>
</child>
</object>
</template>
</interface>
</interface>
5 changes: 5 additions & 0 deletions crates/rnote-ui/src/appwindow/imp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,11 @@ impl RnAppWindow {
.shaper_page()
.shapeconfig_menubutton()
.set_direction(ArrowType::Right);
obj.overlays()
.penssidebar()
.shaper_page()
.shaperextra_menubutton()
.set_direction(ArrowType::Right);
obj.overlays()
.penssidebar()
.shaper_page()
Expand Down
Loading