added background to not look broken

SVN revision: 41363
This commit is contained in:
Andreas Volz 2009-07-16 18:40:58 +00:00
parent ee6059c6b1
commit 2606e9b47b
1 changed files with 18 additions and 5 deletions

View File

@ -16,16 +16,28 @@ int main (int argc, char **argv)
{
ElmApplication elmApp (argc, argv);
// FIXME: graphic artifacts -> maybe background rect needed?
ElmWindow *elmWin = ElmWindow::factory ("window1", ELM_WIN_BASIC);
ElmBackground *bg = ElmBackground::factory (*elmWin);
ElmButton *elmButton = ElmButton::factory (*elmWin);
ElmClock *elmClock = ElmClock::factory (*elmWin);
ElmClock *elmClock = ElmClock::factory (*elmButton);
ElmToggle *elmToggle = ElmToggle::factory (*elmWin);
ElmScroller *elmScroller = ElmScroller::factory (*elmWin);
ElmEntry *elmEntry = ElmEntry::factory (*elmWin);
ElmSlider *elmSlider = ElmSlider::factory (*elmWin);
bg->setWeightHintSize (1.0, 1.0);
elmWin->addObjectResize (*bg);
/* set size hints. a minimum size for the bg. this should propagate back
* to the window thus limiting its size based off the bg as the bg is one
* of the window's resize objects. */
bg->setMinHintSize (Size (160, 160));
/* and set a maximum size. not needed very often. normally used together
* with evas_object_size_hint_min_set() at the same size to make a
* window not resizable */
bg->setMaxHintSize (Size (640, 640));
elmWin->resize (Size (500, 500));
elmButton->resize (Size (100, 50));
elmClock->setGeometry (Rect (100, 50, 200, 50));
@ -45,6 +57,7 @@ int main (int argc, char **argv)
elmToggle->getEventSignal ("sub-object-del")->connect (sigc::ptr_fun (&testFunc));
elmWin->show ();
bg->show ();
elmButton->show ();
elmClock->show ();
elmToggle->show ();
@ -53,4 +66,4 @@ int main (int argc, char **argv)
elmSlider->show ();
elmApp.run ();
}
}