mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-03-13 06:01:21 +00:00
update header bar structure
This commit is contained in:
parent
16f9aaf889
commit
00920d39a9
1
Makefile
1
Makefile
@ -12,7 +12,6 @@ SRCS = src/main.cpp\
|
||||
src/app/browser/container/tab.cpp\
|
||||
src/app/browser/header.cpp\
|
||||
src/app/browser/header/bar.cpp\
|
||||
src/app/browser/header/bar/title.cpp\
|
||||
src/app/browser/header/bar/menu.cpp\
|
||||
src/app/browser/header/bar/menu/main.cpp\
|
||||
src/app/browser/header/bar/menu/main/debug.cpp\
|
||||
|
@ -22,7 +22,7 @@ namespace app
|
||||
);
|
||||
|
||||
// Init title widget
|
||||
gtk_header_bar_set_title_widget(
|
||||
gtk_header_bar_pack_start(
|
||||
GTK_HEADER_BAR(
|
||||
this->gtk
|
||||
),
|
||||
|
@ -33,20 +33,6 @@ namespace app
|
||||
)
|
||||
);
|
||||
|
||||
// Init title
|
||||
this->title = new bar::Title(
|
||||
this
|
||||
);
|
||||
|
||||
gtk_box_append(
|
||||
GTK_BOX(
|
||||
this->gtk
|
||||
),
|
||||
GTK_WIDGET(
|
||||
this->title->gtk
|
||||
)
|
||||
);
|
||||
|
||||
// Render
|
||||
gtk_widget_show(
|
||||
GTK_WIDGET(
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
// Requirements
|
||||
#include "bar/menu.h"
|
||||
#include "bar/title.h"
|
||||
|
||||
namespace app::browser
|
||||
{
|
||||
@ -17,8 +16,6 @@ namespace app::browser
|
||||
namespace bar
|
||||
{
|
||||
class Menu;
|
||||
|
||||
class Title;
|
||||
};
|
||||
|
||||
class Bar
|
||||
@ -36,7 +33,6 @@ namespace app::browser
|
||||
|
||||
// Requirements
|
||||
bar::Menu *menu;
|
||||
bar::Title *title;
|
||||
|
||||
Bar(
|
||||
Header *header
|
||||
|
@ -1,24 +0,0 @@
|
||||
#include "title.h"
|
||||
|
||||
namespace app::browser::header::bar
|
||||
{
|
||||
// Construct
|
||||
Title::Title(
|
||||
Bar *bar
|
||||
) {
|
||||
// Init dependencies
|
||||
this->bar = bar;
|
||||
|
||||
// Init GTK
|
||||
this->gtk = gtk_label_new(
|
||||
Title::LABEL
|
||||
);
|
||||
|
||||
// Render
|
||||
gtk_widget_show(
|
||||
GTK_WIDGET(
|
||||
this->gtk
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
#ifndef APP_BROWSER_HEADER_BAR_TITLE_H
|
||||
#define APP_BROWSER_HEADER_BAR_TITLE_H
|
||||
|
||||
// Dependencies
|
||||
#include "../bar.h"
|
||||
|
||||
namespace app::browser::header
|
||||
{
|
||||
class Bar;
|
||||
|
||||
namespace bar
|
||||
{
|
||||
class Title
|
||||
{
|
||||
public:
|
||||
|
||||
// GTK
|
||||
GtkWidget *gtk;
|
||||
|
||||
// Defaults
|
||||
const char* LABEL = "Yoda";
|
||||
|
||||
// Dependencies
|
||||
Bar *bar;
|
||||
|
||||
Title(
|
||||
Bar *bar
|
||||
);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user