mirror of
https://github.com/uowuo/abaddon.git
synced 2026-08-15 05:19:58 +00:00
basic unread indicators for channels
This commit is contained in:
1 parent
2461406887
commit
af56784797
10 files changed
+174
-10
No files matched your search
@@ -0,0 +1,15 @@
|
||||
#include "unreadrenderer.hpp"
|
||||
#include "abaddon.hpp"
|
||||
|
||||
void UnreadRenderer::RenderUnreadOnChannel(Snowflake id, const Cairo::RefPtr<Cairo::Context> &cr, const Gdk::Rectangle &background_area, const Gdk::Rectangle &cell_area) {
|
||||
const auto state = Abaddon::Get().GetDiscordClient().GetUnreadStateForChannel(id);
|
||||
if (state >= 0) {
|
||||
cr->set_source_rgb(1.0, 1.0, 1.0);
|
||||
const auto x = cell_area.get_x() + 1;
|
||||
const auto y = cell_area.get_y();
|
||||
const auto w = cell_area.get_width();
|
||||
const auto h = cell_area.get_height();
|
||||
cr->rectangle(x, y, 3, h);
|
||||
cr->fill();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user