From 3ef90a70f2e81a6edf98b75401ef429a3aca9693 Mon Sep 17 00:00:00 2001 From: tsukinaha Date: Fri, 20 Dec 2024 21:44:34 +0800 Subject: [PATCH] feat: complete filter panel widget Signed-off-by: tsukinaha --- .../actions/minus-circle-outline-symbolic.svg | 2 ++ .../icons/scalable/actions/month-symbolic.svg | 2 ++ .../icons/scalable/actions/sound-symbolic.svg | 2 ++ .../scalable/actions/tag-outline-symbolic.svg | 2 ++ resources/resources.gresource.xml | 4 +++ resources/style.css | 34 +++++++++++++++++-- resources/ui/filter.ui | 17 ++++++++++ resources/ui/filter_label.ui | 11 +++--- resources/ui/filter_row.ui | 3 ++ src/ui/widgets/filter_panel/dialog.rs | 6 ++++ src/ui/widgets/filter_panel/filter_label.rs | 22 ++++++------ src/ui/widgets/filter_panel/filter_row.rs | 6 +++- src/ui/widgets/search.rs | 3 +- 13 files changed, 95 insertions(+), 19 deletions(-) create mode 100644 resources/icons/scalable/actions/minus-circle-outline-symbolic.svg create mode 100644 resources/icons/scalable/actions/month-symbolic.svg create mode 100644 resources/icons/scalable/actions/sound-symbolic.svg create mode 100644 resources/icons/scalable/actions/tag-outline-symbolic.svg diff --git a/resources/icons/scalable/actions/minus-circle-outline-symbolic.svg b/resources/icons/scalable/actions/minus-circle-outline-symbolic.svg new file mode 100644 index 00000000..8382c96e --- /dev/null +++ b/resources/icons/scalable/actions/minus-circle-outline-symbolic.svg @@ -0,0 +1,2 @@ + + diff --git a/resources/icons/scalable/actions/month-symbolic.svg b/resources/icons/scalable/actions/month-symbolic.svg new file mode 100644 index 00000000..5632b48b --- /dev/null +++ b/resources/icons/scalable/actions/month-symbolic.svg @@ -0,0 +1,2 @@ + + diff --git a/resources/icons/scalable/actions/sound-symbolic.svg b/resources/icons/scalable/actions/sound-symbolic.svg new file mode 100644 index 00000000..6b4d4bd0 --- /dev/null +++ b/resources/icons/scalable/actions/sound-symbolic.svg @@ -0,0 +1,2 @@ + + diff --git a/resources/icons/scalable/actions/tag-outline-symbolic.svg b/resources/icons/scalable/actions/tag-outline-symbolic.svg new file mode 100644 index 00000000..140e60f9 --- /dev/null +++ b/resources/icons/scalable/actions/tag-outline-symbolic.svg @@ -0,0 +1,2 @@ + + diff --git a/resources/resources.gresource.xml b/resources/resources.gresource.xml index 65058d12..23f78037 100644 --- a/resources/resources.gresource.xml +++ b/resources/resources.gresource.xml @@ -24,6 +24,10 @@ icons/scalable/actions/chain-link-loose-symbolic.svg icons/scalable/actions/funnel-outline-symbolic.svg icons/scalable/actions/cross-small-symbolic.svg + icons/scalable/actions/sound-symbolic.svg + icons/scalable/actions/tag-outline-symbolic.svg + icons/scalable/actions/month-symbolic.svg + icons/scalable/actions/minus-circle-outline-symbolic.svg style.css diff --git a/resources/style.css b/resources/style.css index ca3b3a99..eb558508 100644 --- a/resources/style.css +++ b/resources/style.css @@ -16,6 +16,18 @@ button.pill.small { padding: 1px 12px; } +button.pill.no-padding-small { + font-size: 0.83333em; + border-radius: 99px; + margin: 0; + padding: 0px; +} + +.circular.smaller { + min-height:28px; + min-width:28px; +} + .mediainfo { padding: 9px; border-radius: 15px; @@ -283,6 +295,24 @@ checkbutton.theme-selector radio:checked { color: @theme_selected_fg_color; } -.no-padding { - padding: 0px; +.filter-label { + outline-style: solid; + outline-width: 2px; + border-radius: 99px; +} + +.filter-label.color1 { + color: rgb(162, 184, 241); +} + +.filter-label.color2 { + color: rgb(153, 199, 255); +} + +.filter-label.color3 { + color: rgb(112, 177, 230); +} + +.filter-label.color4 { + color: rgb(125, 210, 227); } \ No newline at end of file diff --git a/resources/ui/filter.ui b/resources/ui/filter.ui index 1e92bb4c..c56c3c53 100644 --- a/resources/ui/filter.ui +++ b/resources/ui/filter.ui @@ -75,21 +75,38 @@ Genres + sound-symbolic Tags + tag-outline-symbolic Years + month-symbolic Official Rating + minus-circle-outline-symbolic + + + + + + + + + Apply + emblem-ok-symbolic + diff --git a/resources/ui/filter_label.ui b/resources/ui/filter_label.ui index a77a0808..23ca7c2a 100644 --- a/resources/ui/filter_label.ui +++ b/resources/ui/filter_label.ui @@ -1,12 +1,15 @@ -