mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-30 13:04:13 +00:00
implement label title widget
This commit is contained in:
parent
6f77138796
commit
1d8ec008d3
22
src/app/browser/main/tab/label/title.cpp
Normal file
22
src/app/browser/main/tab/label/title.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
#include "title.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::label;
|
||||
|
||||
Title::Title()
|
||||
{
|
||||
set_text(
|
||||
_("New page")
|
||||
);
|
||||
|
||||
set_ellipsize(
|
||||
Pango::EllipsizeMode::END
|
||||
);
|
||||
|
||||
set_width_chars(
|
||||
WIDTH_CHARS
|
||||
);
|
||||
|
||||
set_single_line_mode(
|
||||
true
|
||||
);
|
||||
}
|
30
src/app/browser/main/tab/label/title.hpp
Normal file
30
src/app/browser/main/tab/label/title.hpp
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef APP_BROWSER_MAIN_TAB_LABEL_NAME_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_LABEL_NAME_HPP
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
#include <glibmm/ustring.h>
|
||||
#include <gtkmm/label.h>
|
||||
#include <pangomm/layout.h>
|
||||
|
||||
namespace app::browser::main::tab::label
|
||||
{
|
||||
class Title : public Gtk::Label
|
||||
{
|
||||
/*
|
||||
* Internal members
|
||||
*/
|
||||
private:
|
||||
|
||||
// Defaults
|
||||
static const int WIDTH_CHARS = 16;
|
||||
|
||||
/*
|
||||
* Class API
|
||||
*/
|
||||
public:
|
||||
|
||||
Title();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_LABEL_NAME_HPP
|
Loading…
x
Reference in New Issue
Block a user