mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
add viewport
This commit is contained in:
parent
df7fe0273b
commit
f889f754c4
2 changed files with 29 additions and 12 deletions
|
|
@ -4,20 +4,36 @@ using namespace app::browser::main::tab::page::content::text;
|
||||||
|
|
||||||
Plain::Plain(
|
Plain::Plain(
|
||||||
const Glib::ustring & TEXT
|
const Glib::ustring & TEXT
|
||||||
|
) : Gtk::Viewport( // add scrolled window features support
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
) {
|
) {
|
||||||
set_valign(
|
set_scroll_to_focus(
|
||||||
Gtk::Align::START
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
set_wrap(
|
auto label = Gtk::make_managed<Gtk::Label>( // @TODO separated file?
|
||||||
true
|
|
||||||
);
|
|
||||||
|
|
||||||
set_selectable(
|
|
||||||
true
|
|
||||||
);
|
|
||||||
|
|
||||||
set_text(
|
|
||||||
TEXT
|
TEXT
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Init widget
|
||||||
|
label->set_valign(
|
||||||
|
Gtk::Align::START
|
||||||
|
);
|
||||||
|
|
||||||
|
label->set_wrap(
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
label->set_selectable(
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
label->set_use_markup(
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
|
set_child(
|
||||||
|
* label
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -4,10 +4,11 @@
|
||||||
#include <glibmm/ustring.h>
|
#include <glibmm/ustring.h>
|
||||||
#include <gtkmm/enums.h>
|
#include <gtkmm/enums.h>
|
||||||
#include <gtkmm/label.h>
|
#include <gtkmm/label.h>
|
||||||
|
#include <gtkmm/viewport.h>
|
||||||
|
|
||||||
namespace app::browser::main::tab::page::content::text
|
namespace app::browser::main::tab::page::content::text
|
||||||
{
|
{
|
||||||
class Plain : public Gtk::Label
|
class Plain : public Gtk::Viewport
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue