mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
update header bar structure
This commit is contained in:
parent
16f9aaf889
commit
00920d39a9
6 changed files with 1 additions and 77 deletions
1
Makefile
1
Makefile
|
|
@ -12,7 +12,6 @@ SRCS = src/main.cpp\
|
||||||
src/app/browser/container/tab.cpp\
|
src/app/browser/container/tab.cpp\
|
||||||
src/app/browser/header.cpp\
|
src/app/browser/header.cpp\
|
||||||
src/app/browser/header/bar.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.cpp\
|
||||||
src/app/browser/header/bar/menu/main.cpp\
|
src/app/browser/header/bar/menu/main.cpp\
|
||||||
src/app/browser/header/bar/menu/main/debug.cpp\
|
src/app/browser/header/bar/menu/main/debug.cpp\
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ namespace app
|
||||||
);
|
);
|
||||||
|
|
||||||
// Init title widget
|
// Init title widget
|
||||||
gtk_header_bar_set_title_widget(
|
gtk_header_bar_pack_start(
|
||||||
GTK_HEADER_BAR(
|
GTK_HEADER_BAR(
|
||||||
this->gtk
|
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
|
// Render
|
||||||
gtk_widget_show(
|
gtk_widget_show(
|
||||||
GTK_WIDGET(
|
GTK_WIDGET(
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
#include "bar/menu.h"
|
#include "bar/menu.h"
|
||||||
#include "bar/title.h"
|
|
||||||
|
|
||||||
namespace app::browser
|
namespace app::browser
|
||||||
{
|
{
|
||||||
|
|
@ -17,8 +16,6 @@ namespace app::browser
|
||||||
namespace bar
|
namespace bar
|
||||||
{
|
{
|
||||||
class Menu;
|
class Menu;
|
||||||
|
|
||||||
class Title;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class Bar
|
class Bar
|
||||||
|
|
@ -36,7 +33,6 @@ namespace app::browser
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
bar::Menu *menu;
|
bar::Menu *menu;
|
||||||
bar::Title *title;
|
|
||||||
|
|
||||||
Bar(
|
Bar(
|
||||||
Header *header
|
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…
Add table
Add a link
Reference in a new issue