ahodesuka / ahoviewer

A GTK image viewer, manga reader, and booru browser
MIT License
480 stars 30 forks source link

Tag categories #100

Closed botist closed 4 years ago

botist commented 4 years ago

I see you're implementing a bunch of new features to your GTK3 branch, thought I'd suggest separating tags by categories (artist, character, copyright, meta, general) for easier navigation

ahodesuka commented 4 years ago

image

Here's the design I came up with, the colors for can be set via ~/.config/gtk-3.0/gtk.css by defining the following:

@define-color ahoviewer_artist #cf7275;
@define-color ahoviewer_character #9ebf7c;
@define-color ahoviewer_copyright #c98dad;
@define-color ahoviewer_metadata #edc472;
@define-color ahoviewer_general #e9e6e6;
@define-color ahoviewer_deprecated #bcb9b9;

Or via the config file like:

TagArtistColor = "#cf7275";
TagCharacterColor = "#9ebf7c";
TagCopyrightColor = "#c98dad";
TagMetadataColor = "#edc472";

Setting it via CSS will only affect the TagView, and not the autocomplete popup. But you can only set the general and deprecated colors via CSS.

GtkListBox performance is pretty poor, but should be fine since there usually aren't a huge number of tags on a single post.

Note that this only works for Danbooru (danbooru.donmai.us) V2, and Gelbooru.com. I may potentially add support for moebooru based boorus, but I'll have to put that off for now.

The headers can be disabled (via right clicking and on the tagview) and the sort mode can also be changed back to alphabetical as well.

botist commented 4 years ago

as the feature is added, should I close the issue? btw this feature is so good i love it <3

ahodesuka commented 4 years ago

This issue will automatically close when I merge the gtk3 branch into master, which I might end up doing today.