mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-03-12 13:41:34 +00:00
update header init
This commit is contained in:
parent
7c5c72a43f
commit
5d042b84b0
@ -9,13 +9,6 @@ Yoda::Browser::Browser(
|
||||
)
|
||||
);
|
||||
|
||||
gtk_window_set_title(
|
||||
GTK_WINDOW(
|
||||
this->gtk
|
||||
),
|
||||
Browser::TITLE
|
||||
);
|
||||
|
||||
gtk_window_set_default_size(
|
||||
GTK_WINDOW(
|
||||
this->gtk
|
||||
@ -24,15 +17,11 @@ Yoda::Browser::Browser(
|
||||
Browser::HEIGHT
|
||||
);
|
||||
|
||||
GtkWidget *label = gtk_label_new(
|
||||
"Hello, World!"
|
||||
);
|
||||
|
||||
gtk_window_set_child(
|
||||
gtk_window_set_titlebar(
|
||||
GTK_WINDOW(
|
||||
this->gtk
|
||||
),
|
||||
label
|
||||
(new YodaBrowser::Header())->gtk
|
||||
);
|
||||
|
||||
gtk_widget_show(
|
||||
@ -40,6 +29,4 @@ Yoda::Browser::Browser(
|
||||
this->gtk
|
||||
)
|
||||
);
|
||||
|
||||
// @TODO signals
|
||||
}
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include "../main.h"
|
||||
|
||||
#include "Browser/Header.h"
|
||||
|
||||
namespace Yoda
|
||||
{
|
||||
class Browser
|
||||
@ -13,7 +15,6 @@ namespace Yoda
|
||||
|
||||
const guint WIDTH = 640;
|
||||
const guint HEIGHT = 480;
|
||||
const gchar* TITLE = "Yoda";
|
||||
|
||||
Browser(
|
||||
GtkApplication *application
|
||||
|
@ -1,8 +1,7 @@
|
||||
#include "Header.h"
|
||||
|
||||
YodaBrowser::Header::Header(
|
||||
Yoda::Browser *browser
|
||||
) {
|
||||
YodaBrowser::Header::Header()
|
||||
{
|
||||
// Init GTK
|
||||
this->gtk = gtk_header_bar_new();
|
||||
|
||||
|
@ -3,27 +3,17 @@
|
||||
|
||||
#include "../../main.h"
|
||||
|
||||
#include "../Browser.h"
|
||||
|
||||
namespace YodaBrowser
|
||||
{
|
||||
class Header
|
||||
{
|
||||
public:
|
||||
|
||||
// GTK
|
||||
GtkWidget *gtk;
|
||||
|
||||
// Dependencies
|
||||
Yoda::Browser *browser;
|
||||
|
||||
// Defaults
|
||||
const gboolean SHOW_TITLE_BUTTONS = true;
|
||||
|
||||
// Construct
|
||||
Header(
|
||||
Yoda::Browser *browser
|
||||
);
|
||||
Header();
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user