From 841f23a2db83cedbe5548ac9b9480ec9e337c728 Mon Sep 17 00:00:00 2001 From: Edouard Dupin Date: Tue, 6 Nov 2012 18:08:44 +0100 Subject: [PATCH] [DEV] permit to change the display --- Sources/appl/global.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Sources/appl/global.cpp b/Sources/appl/global.cpp index c515af2..93bd6aa 100644 --- a/Sources/appl/global.cpp +++ b/Sources/appl/global.cpp @@ -27,6 +27,8 @@ #include #include #include +#include +#include #undef __class__ #define __class__ "globals" @@ -126,6 +128,7 @@ static const char * const l_changeIndentation = "edn-event-change-indentation"; static const char * const l_changeSpace = "edn-event-change-spaces"; static const char * const l_changeTabulation = "edn-event-change-tabulation"; static const char * const l_changeEndOfLine = "edn-event-change-endOfLine"; +static const char * const l_changeRounded = "edn-event-change-rounded"; globals::ParameterGlobalsGui::ParameterGlobalsGui(void) { @@ -176,6 +179,15 @@ globals::ParameterGlobalsGui::ParameterGlobalsGui(void) myCheckbox->RegisterOnEvent(this, ewolEventCheckBoxClicked, l_changeEndOfLine); SubWidgetAdd(myCheckbox); } + myCheckbox = new ewol::CheckBox("switch Rounded/default"); + if (NULL == myCheckbox) { + APPL_ERROR("Can not allocate widget ==> display might be in error"); + } else { + myCheckbox->SetExpendX(true); + myCheckbox->SetValue(IsSetDisplayEndOfLine()); + myCheckbox->RegisterOnEvent(this, ewolEventCheckBoxClicked, l_changeRounded); + SubWidgetAdd(myCheckbox); + } } globals::ParameterGlobalsGui::~ParameterGlobalsGui(void) @@ -219,6 +231,14 @@ void globals::ParameterGlobalsGui::OnReceiveMessage(ewol::EObject * CallerObject } else { SetDisplayTabChar(false); } + } else if (eventId == l_changeRounded) { + if (data == "true") { + etk::theme::SetName("GUI", "rounded");; + } else { + etk::theme::SetName("GUI", "default");; + } + // Reload shaders and graphic system ... + ewol::resource::ReLoadResources(); } }