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 $
Version : $Revision: 1.6 $
Version : $Revision: 1.7 $
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.
*
* @author $Author: fgerlits $
* @version $Revision: 1.6 $
* @version $Revision: 1.7 $
*/
class WhiteWindow : public Gtk::Window
{
@ -271,10 +271,12 @@ class WhiteWindow : public Gtk::Window
* @param title the title of the window.
* @param backgroundColor the RGB value for the background color.
* @param cornerImages the corner images.
* @param resizable true if the user can resize the window.
*/
WhiteWindow(Glib::ustring title,
unsigned int backgroundColor,
Ptr<CornerImages>::Ref cornerImages)
Ptr<CornerImages>::Ref cornerImages,
bool resizable = true)
throw ();
/**

View file

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

View file

@ -22,7 +22,7 @@
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 $
------------------------------------------------------------------------------*/
@ -65,7 +65,8 @@ LoginWindow :: LoginWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
throw ()
: WhiteWindow("",
0xffffff,
WidgetFactory::getInstance()->getWhiteWindowCorners()),
WidgetFactory::getInstance()->getWhiteWindowCorners(),
false),
LocalizedObject(bundle)
{
this->gLiveSupport = gLiveSupport;

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB