mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-03-12 21:51:20 +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_set_default_size(
|
||||||
GTK_WINDOW(
|
GTK_WINDOW(
|
||||||
this->gtk
|
this->gtk
|
||||||
@ -24,15 +17,11 @@ Yoda::Browser::Browser(
|
|||||||
Browser::HEIGHT
|
Browser::HEIGHT
|
||||||
);
|
);
|
||||||
|
|
||||||
GtkWidget *label = gtk_label_new(
|
gtk_window_set_titlebar(
|
||||||
"Hello, World!"
|
|
||||||
);
|
|
||||||
|
|
||||||
gtk_window_set_child(
|
|
||||||
GTK_WINDOW(
|
GTK_WINDOW(
|
||||||
this->gtk
|
this->gtk
|
||||||
),
|
),
|
||||||
label
|
(new YodaBrowser::Header())->gtk
|
||||||
);
|
);
|
||||||
|
|
||||||
gtk_widget_show(
|
gtk_widget_show(
|
||||||
@ -40,6 +29,4 @@ Yoda::Browser::Browser(
|
|||||||
this->gtk
|
this->gtk
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// @TODO signals
|
|
||||||
}
|
}
|
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include "../main.h"
|
#include "../main.h"
|
||||||
|
|
||||||
|
#include "Browser/Header.h"
|
||||||
|
|
||||||
namespace Yoda
|
namespace Yoda
|
||||||
{
|
{
|
||||||
class Browser
|
class Browser
|
||||||
@ -13,7 +15,6 @@ namespace Yoda
|
|||||||
|
|
||||||
const guint WIDTH = 640;
|
const guint WIDTH = 640;
|
||||||
const guint HEIGHT = 480;
|
const guint HEIGHT = 480;
|
||||||
const gchar* TITLE = "Yoda";
|
|
||||||
|
|
||||||
Browser(
|
Browser(
|
||||||
GtkApplication *application
|
GtkApplication *application
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
#include "Header.h"
|
#include "Header.h"
|
||||||
|
|
||||||
YodaBrowser::Header::Header(
|
YodaBrowser::Header::Header()
|
||||||
Yoda::Browser *browser
|
{
|
||||||
) {
|
|
||||||
// Init GTK
|
// Init GTK
|
||||||
this->gtk = gtk_header_bar_new();
|
this->gtk = gtk_header_bar_new();
|
||||||
|
|
||||||
|
@ -3,27 +3,17 @@
|
|||||||
|
|
||||||
#include "../../main.h"
|
#include "../../main.h"
|
||||||
|
|
||||||
#include "../Browser.h"
|
|
||||||
|
|
||||||
namespace YodaBrowser
|
namespace YodaBrowser
|
||||||
{
|
{
|
||||||
class Header
|
class Header
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// GTK
|
|
||||||
GtkWidget *gtk;
|
GtkWidget *gtk;
|
||||||
|
|
||||||
// Dependencies
|
|
||||||
Yoda::Browser *browser;
|
|
||||||
|
|
||||||
// Defaults
|
|
||||||
const gboolean SHOW_TITLE_BUTTONS = true;
|
const gboolean SHOW_TITLE_BUTTONS = true;
|
||||||
|
|
||||||
// Construct
|
Header();
|
||||||
Header(
|
|
||||||
Yoda::Browser *browser
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user