From ce5559129534d045954aa381f795e09b71f68f54 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 1 Sep 2012 23:35:17 +0200 Subject: [PATCH] CComponentsShapeSircle: fix segfault on init Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/4b1d9ca213b3f1b6be75ed774a63c1bc2c7b3162 Author: Thilo Graf Date: 2012-09-01 (Sat, 01 Sep 2012) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc.h | 12 ++++++++++++ src/gui/components/components.cpp | 19 ++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/gui/components/cc.h b/src/gui/components/cc.h index fcce4a8db..1cb22eb7b 100644 --- a/src/gui/components/cc.h +++ b/src/gui/components/cc.h @@ -389,4 +389,16 @@ class CComponentsTitleBar : public CComponentsItemBox }; + +class CComponentsForm : public CComponentsContainer +{ + private: + + public: + CComponentsForm(); + + void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); + +}; + #endif diff --git a/src/gui/components/components.cpp b/src/gui/components/components.cpp index a601eb609..b36f62965 100644 --- a/src/gui/components/components.cpp +++ b/src/gui/components/components.cpp @@ -455,8 +455,7 @@ CComponentsShapeCircle::CComponentsShapeCircle( int x_pos, int y_pos, int diam, //CComponents x = x_pos; y = y_pos; - width = d; - height = d; + //width = height = d = diam; shadow = has_shadow; shadow_w = SHADOW_OFFSET; col_frame = color_frame; @@ -467,7 +466,7 @@ CComponentsShapeCircle::CComponentsShapeCircle( int x_pos, int y_pos, int diam, bgMode = CC_BGMODE_PERMANENT; //CComponentsShapeCircle - d = diam; + width = height = d = diam; //CComponentsContainer corner_rad = d/2; @@ -1314,3 +1313,17 @@ void CComponentsTitleBar::paint(bool do_save_bg) paintItemBox(do_save_bg); } + +//------------------------------------------------------------------------------------------------------- +//sub class CComponentsForm from CComponentsItemBox +CComponentsForm::CComponentsForm() +{ + //CComponentsContainer + initVarContainer(); +} + +void CComponentsForm::paint(bool do_save_bg) +{ + paintInit(do_save_bg); +} +