mirror of https://github.com/daleclack/My_GtkUi
Replace title bar for draw app
This commit is contained in:
parent
df11ea4d11
commit
f08409f93e
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include "MyTitleBar.hh"
|
||||
|
||||
class CalcApp : public Gtk::Window
|
||||
{
|
||||
|
@ -11,6 +12,7 @@ public:
|
|||
private:
|
||||
// Main GtkBuilder
|
||||
Glib::RefPtr<Gtk::Builder> ref_builder;
|
||||
MyTitleBar title_bar;
|
||||
|
||||
// Calculator Class
|
||||
int pos;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include "MyTitleBar.hh"
|
||||
|
||||
// 4 Draw modes: default(free draw), circle, line, rectangle
|
||||
enum class DrawMode{
|
||||
|
@ -19,6 +20,9 @@ enum class DrawProcess{
|
|||
|
||||
class Drawing : public Gtk::Window
|
||||
{
|
||||
// Custom title bar
|
||||
MyTitleBar title_bar;
|
||||
|
||||
// Drawing Mode
|
||||
DrawMode drawing_mode;
|
||||
|
||||
|
|
|
@ -15,7 +15,8 @@ Drawing::Drawing()
|
|||
{
|
||||
// Ininalize window
|
||||
set_icon_name("org.gtk.daleclack");
|
||||
set_title("Drawing");
|
||||
title_bar.set_ctrl_win(this);
|
||||
title_bar.set_title("Drawing");
|
||||
set_default_size(640, 480);
|
||||
|
||||
// Set the buttons grouped and set normal draw mode
|
||||
|
|
Loading…
Reference in New Issue