From d10a1b79e42f159abb9f13e8cc576e9a2848443b Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 13 Jun 2014 20:34:09 +0200 Subject: [PATCH] CComponents: epand method setFrameThickness() to change selected frame Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/8bbd7024d94e3d2989e6e29778006e8531596d2a Author: Thilo Graf Date: 2014-06-13 (Fri, 13 Jun 2014) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_base.cpp | 8 ++++++++ src/gui/components/cc_base.h | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/gui/components/cc_base.cpp b/src/gui/components/cc_base.cpp index 33f074794..17bc1d811 100644 --- a/src/gui/components/cc_base.cpp +++ b/src/gui/components/cc_base.cpp @@ -282,3 +282,11 @@ inline void CComponents::setYPos(const int& ypos) { y = ypos; } + +void CComponents::setFrameThickness(const int& thickness, const int& thickness_sel) +{ + fr_thickness = thickness; + + if (fr_thickness_sel != thickness_sel) + fr_thickness_sel = thickness_sel; +} diff --git a/src/gui/components/cc_base.h b/src/gui/components/cc_base.h index 7a9fc262b..973da83a0 100644 --- a/src/gui/components/cc_base.h +++ b/src/gui/components/cc_base.h @@ -81,9 +81,9 @@ class CComponents : public COSDFader ///property: width of shadow int shadow_w; - ///property: frame thickness + ///property: frame thickness, see also setFrameThickness() int fr_thickness; - ///property: frame thickness of selected component + ///property: frame thickness of selected component, see also setFrameThickness() int fr_thickness_sel; ///status: true=component was painted for 1st time @@ -194,7 +194,7 @@ class CComponents : public COSDFader inline virtual int getCornerRadius(){return corner_rad;}; ///set frame thickness - inline virtual void setFrameThickness(const int& thickness){fr_thickness = thickness;}; + virtual void setFrameThickness(const int& thickness, const int& thickness_sel = 3); ///switch shadow on/off ///Note: it's recommended to use #defines: CC_SHADOW_ON=true or CC_SHADOW_OFF=false as parameter, see also cc_types.h inline virtual void setShadowOnOff(bool has_shadow){shadow = has_shadow;};