diff --git a/build b/build index d2180be4..b3962202 160000 --- a/build +++ b/build @@ -1 +1 @@ -Subproject commit d2180be4a67230150a2001920a600395c3190fd2 +Subproject commit b3962202f4a5075ab7eb8f27be25b515a4206be4 diff --git a/data/theme/default/widgetButton.frag b/data/theme/default/widgetButton.frag index a9566e89..8271e9e1 100644 --- a/data/theme/default/widgetButton.frag +++ b/data/theme/default/widgetButton.frag @@ -2,7 +2,6 @@ precision mediump float; precision mediump int; #endif - struct displayProperty { vec2 size; vec2 origin; @@ -37,7 +36,6 @@ void main(void) { S_colorFg[3] = vec4(0.0,0.7,0.0,0.4); // prevent origin moving ... vec2 position = v_position - EW_widgetProperty.origin; - float specialBorder = S_sizeBorder+S_sizePadding; vec2 endStart = EW_widgetProperty.size - vec2(S_sizePadding) - vec2(S_sizeBorder); vec2 endStop = EW_widgetProperty.size - vec2(S_sizePadding); @@ -53,8 +51,9 @@ void main(void) { ) { gl_FragColor = S_colorBorder; } else { - gl_FragColor = S_colorFg[EW_status.stateOld]*(1.0-EW_status.transition) - + S_colorFg[EW_status.stateNew]*EW_status.transition; + // note : int() is needed for the OpenGL ES platform + gl_FragColor = S_colorFg[int(EW_status.stateOld)]*(1.0-EW_status.transition) + + S_colorFg[int(EW_status.stateNew)]*EW_status.transition; } } else { gl_FragColor = S_colorBg; diff --git a/data/theme/default/widgetEntry.frag b/data/theme/default/widgetEntry.frag index 0795db08..12b730a4 100644 --- a/data/theme/default/widgetEntry.frag +++ b/data/theme/default/widgetEntry.frag @@ -55,8 +55,9 @@ void main(void) { // border ... gl_FragColor = S_colorBorder; } else { - gl_FragColor = S_colorFg[EW_status.stateOld]*(1.0-EW_status.transition) - + S_colorFg[EW_status.stateNew]*EW_status.transition; + // note : int() is needed for the OpenGL ES platform + gl_FragColor = S_colorFg[int(EW_status.stateOld)]*(1.0-EW_status.transition) + + S_colorFg[int(EW_status.stateNew)]*EW_status.transition; } } else { gl_FragColor = S_colorBg; diff --git a/external/etk b/external/etk index 5e87dea8..ba9e2fca 160000 --- a/external/etk +++ b/external/etk @@ -1 +1 @@ -Subproject commit 5e87dea87f22b06103c5ff3f8087f28fcb4ae50c +Subproject commit ba9e2fca7bece1f46eac6f29c0ca5e2c54f59d89 diff --git a/external/parsersvg b/external/parsersvg index 6ff447ea..8d360abd 160000 --- a/external/parsersvg +++ b/external/parsersvg @@ -1 +1 @@ -Subproject commit 6ff447eadb51765b42574baf8d3dd2ed791af617 +Subproject commit 8d360abdaef587b4eaf880467cb71eb122c1d9d1 diff --git a/sources/ewol/ewol.cpp b/sources/ewol/ewol.cpp index 40594a1c..0bc1fcbc 100644 --- a/sources/ewol/ewol.cpp +++ b/sources/ewol/ewol.cpp @@ -135,6 +135,10 @@ void ewol::ForceOrientation(ewol::orientation_te orientation) } +void ewol::SetIcon(etk::UString icon) +{ + guiInterface::SetIcon(icon); +} diff --git a/sources/ewol/ewol.h b/sources/ewol/ewol.h index c35d304c..5ea0f1cc 100644 --- a/sources/ewol/ewol.h +++ b/sources/ewol/ewol.h @@ -87,7 +87,6 @@ namespace ewol * @brief This is to transfert the event from one widget to another one * @param source the widget where the event came from * @param destination the widget where the event mitgh be generated now - * @return --- */ void InputEventTransfertWidget(ewol::Widget* source, ewol::Widget* destination); typedef enum { @@ -96,11 +95,16 @@ namespace ewol SCREEN_ORIENTATION_PORTRAIT, } orientation_te; /** - * @brief - * @param[in] + * @brief Force a specific orientation for mobile devices + * @param[in] orientation the requested position. */ void ForceOrientation(ewol::orientation_te orientation); - + /** + * @brief Set the Icon of the program + * @param[in] icon new filename icon of the curent program. + * @note Does not work on Andoid + */ + void SetIcon(etk::UString icon); }; #endif diff --git a/sources/ewol/renderer/os/gui.Android.base.cpp b/sources/ewol/renderer/os/gui.Android.base.cpp index d25a0842..40fabf0b 100644 --- a/sources/ewol/renderer/os/gui.Android.base.cpp +++ b/sources/ewol/renderer/os/gui.Android.base.cpp @@ -614,5 +614,9 @@ void guiInterface::SetCursor(ewol::cursorDisplay_te newCursor) // nothing to do ... } +void guiInterface::SetIcon(etk::UString inputFile) +{ + // nothing to do ... +} diff --git a/sources/ewol/renderer/os/gui.Windows.cpp b/sources/ewol/renderer/os/gui.Windows.cpp index cdd41713..6d66a3e5 100644 --- a/sources/ewol/renderer/os/gui.Windows.cpp +++ b/sources/ewol/renderer/os/gui.Windows.cpp @@ -148,6 +148,10 @@ void guiInterface::ClipBoardSet(ewol::clipBoard::clipboardListe_te clipboardID) } } +void guiInterface::SetIcon(etk::UString inputFile) +{ + // TODO : ... +} #include @@ -179,10 +183,6 @@ int guiInterface::main(int argc, const char *argv[]) } //start the basic thread : eSystem::Init(); - // get the icon file : - etk::UString myIcon = APP_Icon(); - //SetIcon(myIcon); - // Run ... Windows_Run(); // close windows system : diff --git a/sources/ewol/renderer/os/gui.X11.cpp b/sources/ewol/renderer/os/gui.X11.cpp index eaec9a5e..eb1832e2 100644 --- a/sources/ewol/renderer/os/gui.X11.cpp +++ b/sources/ewol/renderer/os/gui.X11.cpp @@ -289,7 +289,7 @@ void guiInterface::SetTitle(etk::UString& title) #include #include -void SetIcon(etk::UString inputFile) +void guiInterface::SetIcon(etk::UString inputFile) { draw::Image dataImage; // load data @@ -1334,9 +1334,6 @@ int guiInterface::main(int argc, const char *argv[]) X11_Init(); //start the basic thread : eSystem::Init(); - // get the icon file : - etk::UString myIcon = APP_Icon(); - SetIcon(myIcon); // Run ... X11_Run(); // close X11 : diff --git a/sources/ewol/renderer/os/gui.h b/sources/ewol/renderer/os/gui.h index f7fb69dc..bede4935 100644 --- a/sources/ewol/renderer/os/gui.h +++ b/sources/ewol/renderer/os/gui.h @@ -82,13 +82,17 @@ namespace guiInterface * @param[in] newCursor selected new cursor. */ void SetCursor(ewol::cursorDisplay_te newCursor); + /** + * @brief Set the Icon of the program + * @param[in] inputFile new filename icon of the curent program. + */ + void SetIcon(etk::UString inputFile); }; //!< must be define in CPP by the application ... this are the main init and unInit of the Application -void APP_Init(void); -void APP_UnInit(void); -etk::UString APP_Icon(void); +void APP_Init(void); +void APP_UnInit(void); #define NB_MAX_INPUT (20)