Browse Source

draft viewport integration

CPP-GTK4
yggverse 2 months ago
parent
commit
c5919e71a2
  1. 11
      src/app/browser/main/tab/page/content/text.cpp
  2. 2
      src/app/browser/main/tab/page/content/text.hpp

11
src/app/browser/main/tab/page/content/text.cpp

@ -12,11 +12,20 @@ Text::Text()
void Text::set_gemini( void Text::set_gemini(
const Glib::ustring & GEMTEXT const Glib::ustring & GEMTEXT
) { ) {
set_child( auto viewport = new Gtk::Viewport( // @TODO
NULL, //Gtk::Adjustment::H
NULL //Gtk::Adjustment::V
);
viewport->set_child(
* new text::Gemini( // @TODO manage * new text::Gemini( // @TODO manage
GEMTEXT GEMTEXT
) )
); );
set_child(
* viewport
);
} }
void Text::set_plain( void Text::set_plain(

2
src/app/browser/main/tab/page/content/text.hpp

@ -2,7 +2,9 @@
#define APP_BROWSER_MAIN_TAB_PAGE_CONTENT_TEXT_HPP #define APP_BROWSER_MAIN_TAB_PAGE_CONTENT_TEXT_HPP
#include <glibmm/ustring.h> #include <glibmm/ustring.h>
//#include <gtkmm/adjustment.h> @TODO
#include <gtkmm/scrolledwindow.h> #include <gtkmm/scrolledwindow.h>
#include <gtkmm/viewport.h>
namespace app::browser::main::tab::page::content namespace app::browser::main::tab::page::content
{ {

Loading…
Cancel
Save