Browse Source

draft css provider

CPP-GTK4
yggverse 4 months ago
parent
commit
5e88040bf0
  1. 12
      src/app/browser/main/tab/page/content/text/gemini/reader.cpp
  2. 4
      src/app/browser/main/tab/page/content/text/gemini/reader.css
  3. 1
      src/app/browser/main/tab/page/content/text/gemini/reader.hpp

12
src/app/browser/main/tab/page/content/text/gemini/reader.cpp

@ -28,6 +28,18 @@ Reader::Reader( @@ -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

4
src/app/browser/main/tab/page/content/text/gemini/reader.css

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
label
{
caret-color: transparent;
}

1
src/app/browser/main/tab/page/content/text/gemini/reader.hpp

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
#include <glibmm/markup.h>
#include <glibmm/regex.h>
#include <glibmm/ustring.h>
#include <gtkmm/cssprovider.h>
#include <gtkmm/enums.h>
#include <gtkmm/label.h>

Loading…
Cancel
Save