From 5e88040bf005238d3795eaae0ec2d8993e9d6515 Mon Sep 17 00:00:00 2001 From: yggverse Date: Sat, 14 Sep 2024 08:50:53 +0300 Subject: [PATCH] draft css provider --- .../main/tab/page/content/text/gemini/reader.cpp | 12 ++++++++++++ .../main/tab/page/content/text/gemini/reader.css | 4 ++++ .../main/tab/page/content/text/gemini/reader.hpp | 1 + 3 files changed, 17 insertions(+) create mode 100644 src/app/browser/main/tab/page/content/text/gemini/reader.css diff --git a/src/app/browser/main/tab/page/content/text/gemini/reader.cpp b/src/app/browser/main/tab/page/content/text/gemini/reader.cpp index 1be901ef..07849ace 100644 --- a/src/app/browser/main/tab/page/content/text/gemini/reader.cpp +++ b/src/app/browser/main/tab/page/content/text/gemini/reader.cpp @@ -28,6 +28,18 @@ Reader::Reader( ) ); + // Connect CSS + auto css = Gtk::CssProvider::create(); + + css->load_from_path( + "src/app/browser/main/tab/page/content/text/gemini/reader.css" // @TODO + ); + + get_style_context()->add_provider( + css, + GTK_STYLE_PROVIDER_PRIORITY_APPLICATION + ); + // Connect signals signal_activate_link().connect( [this](const Glib::ustring & URI) -> bool diff --git a/src/app/browser/main/tab/page/content/text/gemini/reader.css b/src/app/browser/main/tab/page/content/text/gemini/reader.css new file mode 100644 index 00000000..c57d5b2f --- /dev/null +++ b/src/app/browser/main/tab/page/content/text/gemini/reader.css @@ -0,0 +1,4 @@ +label +{ + caret-color: transparent; +} \ No newline at end of file diff --git a/src/app/browser/main/tab/page/content/text/gemini/reader.hpp b/src/app/browser/main/tab/page/content/text/gemini/reader.hpp index 0d0b2d38..a24addef 100644 --- a/src/app/browser/main/tab/page/content/text/gemini/reader.hpp +++ b/src/app/browser/main/tab/page/content/text/gemini/reader.hpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include