diff options
author | bobufa <bobufa@users.noreply.github.com> | 2018-08-01 15:20:56 +0200 |
---|---|---|
committer | bobufa <bobufa@users.noreply.github.com> | 2018-08-13 22:39:18 +0200 |
commit | c0844bdea428c10949339960bd16ea5e2a335fb8 (patch) | |
tree | f2e1e3f0257a7d0ef41f052a31eb143f613fb8d6 /main/data | |
parent | b0c94641fcf85ed55976e894fea970331ae22892 (diff) | |
download | dino-c0844bdea428c10949339960bd16ea5e2a335fb8.tar.gz dino-c0844bdea428c10949339960bd16ea5e2a335fb8.zip |
add suggestions/auto-complete for search filters
Diffstat (limited to 'main/data')
-rw-r--r-- | main/data/global_search.ui | 249 | ||||
-rw-r--r-- | main/data/search_autocomplete.ui | 24 | ||||
-rw-r--r-- | main/data/theme.css | 19 | ||||
-rw-r--r-- | main/data/unified_main_content.ui | 4 |
4 files changed, 173 insertions, 123 deletions
diff --git a/main/data/global_search.ui b/main/data/global_search.ui index 3c4597c1..44abf6de 100644 --- a/main/data/global_search.ui +++ b/main/data/global_search.ui @@ -1,144 +1,167 @@ <?xml version="1.0" encoding="UTF-8"?> <interface> - <template class="DinoUiGlobalSearch" parent="GtkBox"> - <property name="orientation">vertical</property> + <template class="DinoUiGlobalSearch" parent="GtkOverlay"> <property name="visible">True</property> <child> - <object class="GtkSearchEntry" id="search_entry"> - <property name="visible">True</property> - <property name="margin">12</property> - </object> - </child> - <child> - <object class="GtkStack" id="results_empty_stack"> + <object class="GtkBox"> + <property name="orientation">vertical</property> <property name="visible">True</property> <child> - <object class="GtkBox"> - <property name="orientation">vertical</property> - <property name="spacing">10</property> - <property name="valign">center</property> + <object class="GtkSearchEntry" id="search_entry"> <property name="visible">True</property> - <child> - <object class="GtkImage"> - <property name="visible">True</property> - <property name="icon-name">system-search-symbolic</property> - <property name="icon-size">4</property> - <property name="pixel-size">72</property> - <style> - <class name="dim-label"/> - </style> - </object> - </child> - <child> - <object class="GtkLabel"> - <property name="label" translatable="yes">No active search</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="visible">True</property> - <attributes> - <attribute name="weight" value="PANGO_WEIGHT_BOLD"/> - <attribute name="scale" value="1.3"/> - </attributes> - <style> - <class name="dim-label"/> - </style> - </object> - </child> - <child> - <object class="GtkLabel"> - <property name="label" translatable="yes">Type to start a search</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="visible">True</property> - <style> - <class name="dim-label"/> - </style> - </object> - </child> + <property name="margin">12</property> </object> - <packing> - <property name="name">empty</property> - </packing> </child> <child> - <object class="GtkBox"> - <property name="orientation">vertical</property> - <property name="spacing">10</property> - <property name="valign">center</property> + <object class="GtkStack" id="results_empty_stack"> <property name="visible">True</property> <child> - <object class="GtkImage"> + <object class="GtkBox"> + <property name="orientation">vertical</property> + <property name="spacing">10</property> + <property name="valign">center</property> <property name="visible">True</property> - <property name="icon-name">face-uncertain-symbolic</property> - <property name="icon-size">4</property> - <property name="pixel-size">72</property> - <style> - <class name="dim-label"/> - </style> - </object> - </child> - <child> - <object class="GtkLabel"> - <property name="label" translatable="yes">No matching messages</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="visible">True</property> - <attributes> - <attribute name="weight" value="PANGO_WEIGHT_BOLD"/> - <attribute name="scale" value="1.3"/> - </attributes> - <style> - <class name="dim-label"/> - </style> - </object> - </child> - <child> - <object class="GtkLabel"> - <property name="label" translatable="yes">Check the spelling or try to remove filters</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="visible">True</property> - <style> - <class name="dim-label"/> - </style> + <child> + <object class="GtkImage"> + <property name="visible">True</property> + <property name="icon-name">system-search-symbolic</property> + <property name="icon-size">4</property> + <property name="pixel-size">72</property> + <style> + <class name="dim-label"/> + </style> + </object> + </child> + <child> + <object class="GtkLabel"> + <property name="label" translatable="yes">No active search</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="visible">True</property> + <attributes> + <attribute name="weight" value="PANGO_WEIGHT_BOLD"/> + <attribute name="scale" value="1.3"/> + </attributes> + <style> + <class name="dim-label"/> + </style> + </object> + </child> + <child> + <object class="GtkLabel"> + <property name="label" translatable="yes">Type to start a search</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="visible">True</property> + <style> + <class name="dim-label"/> + </style> + </object> + </child> </object> + <packing> + <property name="name">empty</property> + </packing> </child> - </object> - <packing> - <property name="name">no-result</property> - </packing> - </child>z - <child> - <object class="GtkBox"> - <property name="orientation">vertical</property> - <property name="visible">True</property> <child> - <object class="GtkLabel" id="entry_number_label"> - <property name="xalign">0</property> - <property name="use-markup">True</property> - <property name="margin-left">17</property> + <object class="GtkBox"> + <property name="orientation">vertical</property> + <property name="spacing">10</property> + <property name="valign">center</property> <property name="visible">True</property> + <child> + <object class="GtkImage"> + <property name="visible">True</property> + <property name="icon-name">face-uncertain-symbolic</property> + <property name="icon-size">4</property> + <property name="pixel-size">72</property> + <style> + <class name="dim-label"/> + </style> + </object> + </child> + <child> + <object class="GtkLabel"> + <property name="label" translatable="yes">No matching messages</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="visible">True</property> + <attributes> + <attribute name="weight" value="PANGO_WEIGHT_BOLD"/> + <attribute name="scale" value="1.3"/> + </attributes> + <style> + <class name="dim-label"/> + </style> + </object> + </child> + <child> + <object class="GtkLabel"> + <property name="label" translatable="yes">Check the spelling or try to remove filters</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="visible">True</property> + <style> + <class name="dim-label"/> + </style> + </object> + </child> </object> + <packing> + <property name="name">no-result</property> + </packing> </child> <child> - <object class="GtkScrolledWindow" id="results_scrolled"> - <property name="hscrollbar-policy">never</property> - <property name="expand">True</property> + <object class="GtkBox"> + <property name="orientation">vertical</property> <property name="visible">True</property> <child> - <object class="GtkBox" id="results_box"> - <property name="orientation">vertical</property> - <property name="spacing">25</property> - <property name="margin">10</property> + <object class="GtkLabel" id="entry_number_label"> + <property name="xalign">0</property> + <property name="use-markup">True</property> + <property name="margin-left">17</property> + <property name="visible">True</property> + </object> + </child> + <child> + <object class="GtkScrolledWindow" id="results_scrolled"> + <property name="hscrollbar-policy">never</property> + <property name="expand">True</property> <property name="visible">True</property> + <child> + <object class="GtkBox" id="results_box"> + <property name="orientation">vertical</property> + <property name="spacing">25</property> + <property name="margin">10</property> + <property name="visible">True</property> + </object> + </child> </object> </child> </object> + <packing> + <property name="name">results</property> + </packing> </child> </object> - <packing> - <property name="name">results</property> - </packing> + </child> + </object> + </child> + <child type="overlay"> + <object class="GtkFrame" id="auto_complete_overlay"> + <property name="visible">True</property> + <property name="margin-top">42</property> + <property name="margin-left">12</property> + <property name="margin-right">12</property> + <property name="valign">start</property> + <style> + <class name="auto-complete"/> + </style> + <child> + <object class="GtkListBox" id="auto_complete_list"> + <property name="visible">True</property> + <property name="selection-mode">browse</property> + </object> </child> </object> </child> diff --git a/main/data/search_autocomplete.ui b/main/data/search_autocomplete.ui new file mode 100644 index 00000000..94ec5d7f --- /dev/null +++ b/main/data/search_autocomplete.ui @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <object class="GtkBox" id="root"> + <property name="orientation">horizontal</property> + <property name="visible">True</property> + <child> + <object class="DinoUiAvatarImage" id="image"> + <property name="margin">4</property> + <property name="margin-start">6</property> + <property name="margin-end">6</property> + <property name="height">24</property> + <property name="width">24</property> + <property name="visible">True</property> + <property name="allow_gray">False</property> + </object> + </child> + <child> + <object class="GtkLabel" id="label"> + <property name="visible">True</property> + <property name="ellipsize">end</property> + </object> + </child> + </object> +</interface>
\ No newline at end of file diff --git a/main/data/theme.css b/main/data/theme.css index ce195924..226689b3 100644 --- a/main/data/theme.css +++ b/main/data/theme.css @@ -33,28 +33,31 @@ window.dino-main .dino-conversation textview, window.dino-main .dino-conversatio background: transparent; } -window.dino-main .dino-sidebar frame { +window.dino-main .dino-sidebar > frame { background: @insensitive_bg_color; border-left: 1px solid @borders; border-bottom: 1px solid @borders; } -window.dino-main .dino-sidebar frame.collapsed { +window.dino-main .dino-sidebar > frame.collapsed { border-bottom: 1px solid @borders; } +window.dino-main .dino-sidebar frame.auto-complete { + background: @theme_base_color; +} + +window.dino-main .dino-sidebar frame.auto-complete list > row { + transition: none; +} + window.dino-main .dino-sidebar textview, window.dino-main .dino-sidebar textview text { background-color: transparent; } - window.dino-main .dino-chatinput frame box { - background: @theme_base_color; -} - -window.dino-main .dino-chatinput frame box:backdrop { - background: @theme_unfocused_base_color; + background: transparent; } window.dino-main button.dino-chatinput-button { diff --git a/main/data/unified_main_content.ui b/main/data/unified_main_content.ui index d5897b1a..b2f3a891 100644 --- a/main/data/unified_main_content.ui +++ b/main/data/unified_main_content.ui @@ -44,13 +44,13 @@ <property name="valign">end</property> <property name="transition-type">crossfade</property> <property name="visible">True</property> + <property name="margin-end">30</property> + <property name="margin-bottom">70</property> <child> <object class="GtkButton" id="goto_end_button"> <property name="vexpand">False</property> <property name="halign">end</property> <property name="valign">end</property> - <property name="margin-end">70</property> - <property name="margin-bottom">100</property> <property name="visible">True</property> <style> <class name="circular"/> |