made resizability (now there's a nice word) optional in WhiteWindow;

also checked in resize image png that was missing
This commit is contained in:
fgerlits 2005-03-22 12:17:34 +00:00
parent 905552c619
commit a340148e0c
4 changed files with 26 additions and 18 deletions

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ Author : $Author: fgerlits $
Version : $Revision: 1.6 $ Version : $Revision: 1.7 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/WhiteWindow.h,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/WhiteWindow.h,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -70,7 +70,7 @@ using namespace LiveSupport::Core;
* A container holding exactly one child, habing a light blue border to it. * A container holding exactly one child, habing a light blue border to it.
* *
* @author $Author: fgerlits $ * @author $Author: fgerlits $
* @version $Revision: 1.6 $ * @version $Revision: 1.7 $
*/ */
class WhiteWindow : public Gtk::Window class WhiteWindow : public Gtk::Window
{ {
@ -271,10 +271,12 @@ class WhiteWindow : public Gtk::Window
* @param title the title of the window. * @param title the title of the window.
* @param backgroundColor the RGB value for the background color. * @param backgroundColor the RGB value for the background color.
* @param cornerImages the corner images. * @param cornerImages the corner images.
* @param resizable true if the user can resize the window.
*/ */
WhiteWindow(Glib::ustring title, WhiteWindow(Glib::ustring title,
unsigned int backgroundColor, unsigned int backgroundColor,
Ptr<CornerImages>::Ref cornerImages) Ptr<CornerImages>::Ref cornerImages,
bool resizable = true)
throw (); throw ();
/** /**

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ Author : $Author: fgerlits $
Version : $Revision: 1.7 $ Version : $Revision: 1.8 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/src/WhiteWindow.cxx,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/src/WhiteWindow.cxx,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -58,7 +58,8 @@ using namespace LiveSupport::Widgets;
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
WhiteWindow :: WhiteWindow(Glib::ustring title, WhiteWindow :: WhiteWindow(Glib::ustring title,
unsigned int backgroundColor, unsigned int backgroundColor,
Ptr<CornerImages>::Ref cornerImages) Ptr<CornerImages>::Ref cornerImages,
bool resizable)
throw () throw ()
: Gtk::Window(Gtk::WINDOW_TOPLEVEL) : Gtk::Window(Gtk::WINDOW_TOPLEVEL)
{ {
@ -105,15 +106,17 @@ WhiteWindow :: WhiteWindow(Glib::ustring title,
layout->attach(*childContainer, 0, 2, 1, 2); layout->attach(*childContainer, 0, 2, 1, 2);
// create the resize image // create the resize image
resizeImage = Gtk::manage(wf->createResizeImage()); if (resizable) {
resizeEventBox = Gtk::manage(new Gtk::EventBox()); resizeImage = Gtk::manage(wf->createResizeImage());
resizeEventBox->modify_bg(Gtk::STATE_NORMAL, bgColor); resizeEventBox = Gtk::manage(new Gtk::EventBox());
resizeEventBox->add(*resizeImage); resizeEventBox->modify_bg(Gtk::STATE_NORMAL, bgColor);
resizeAlignment = Gtk::manage(new Gtk::Alignment(Gtk::ALIGN_RIGHT, resizeEventBox->add(*resizeImage);
Gtk::ALIGN_CENTER, resizeAlignment = Gtk::manage(new Gtk::Alignment(Gtk::ALIGN_RIGHT,
0, 0)); Gtk::ALIGN_CENTER,
resizeAlignment->add(*resizeEventBox); 0, 0));
layout->attach(*resizeAlignment, 1, 2, 2, 3, Gtk::FILL, Gtk::SHRINK); resizeAlignment->add(*resizeEventBox);
layout->attach(*resizeAlignment, 1, 2, 2, 3, Gtk::FILL, Gtk::SHRINK);
}
// add the corners // add the corners
blueBin = Gtk::manage(new BlueBin(backgroundColor, cornerImages)); blueBin = Gtk::manage(new BlueBin(backgroundColor, cornerImages));
@ -131,9 +134,11 @@ WhiteWindow :: WhiteWindow(Glib::ustring title,
closeButton->signal_clicked().connect(sigc::mem_fun(*this, closeButton->signal_clicked().connect(sigc::mem_fun(*this,
&WhiteWindow::onCloseButtonClicked)); &WhiteWindow::onCloseButtonClicked));
resizeEventBox->add_events(Gdk::BUTTON_PRESS_MASK); if (resizable) {
resizeEventBox->signal_button_press_event().connect(sigc::mem_fun(*this, resizeEventBox->add_events(Gdk::BUTTON_PRESS_MASK);
resizeEventBox->signal_button_press_event().connect(sigc::mem_fun(*this,
&WhiteWindow::onResizeClicked)); &WhiteWindow::onResizeClicked));
}
} }

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ Author : $Author: fgerlits $
Version : $Revision: 1.9 $ Version : $Revision: 1.10 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/LoginWindow.cxx,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/LoginWindow.cxx,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -65,7 +65,8 @@ LoginWindow :: LoginWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
throw () throw ()
: WhiteWindow("", : WhiteWindow("",
0xffffff, 0xffffff,
WidgetFactory::getInstance()->getWhiteWindowCorners()), WidgetFactory::getInstance()->getWhiteWindowCorners(),
false),
LocalizedObject(bundle) LocalizedObject(bundle)
{ {
this->gLiveSupport = gLiveSupport; this->gLiveSupport = gLiveSupport;

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB