fixed bug #966
This commit is contained in:
parent
7d9d2e7cad
commit
69d6f756dd
2 changed files with 12 additions and 12 deletions
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.13 $
|
Version : $Revision: 1.14 $
|
||||||
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 $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -94,7 +94,7 @@ using namespace LiveSupport::Core;
|
||||||
* </code></pre>
|
* </code></pre>
|
||||||
*
|
*
|
||||||
* @author $Author: fgerlits $
|
* @author $Author: fgerlits $
|
||||||
* @version $Revision: 1.13 $
|
* @version $Revision: 1.14 $
|
||||||
* @see WidgetFactory
|
* @see WidgetFactory
|
||||||
* @see WidgetFactory#getWhiteWindowCorners
|
* @see WidgetFactory#getWhiteWindowCorners
|
||||||
*/
|
*/
|
||||||
|
@ -124,7 +124,7 @@ class WhiteWindow : public Gtk::Window
|
||||||
/**
|
/**
|
||||||
* The event box for the title, enabling capturing mouse events.
|
* The event box for the title, enabling capturing mouse events.
|
||||||
*/
|
*/
|
||||||
Gtk::EventBox * titleEventBox;
|
Gtk::HBox * titleBox;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The left alignment contaner for the title.
|
* The left alignment contaner for the title.
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.16 $
|
Version : $Revision: 1.17 $
|
||||||
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 $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -67,8 +67,8 @@ WhiteWindow :: WhiteWindow(WidgetFactory::ImageType title,
|
||||||
titleLabel = 0;
|
titleLabel = 0;
|
||||||
Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance();
|
Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance();
|
||||||
Gtk::Image* titleImage = Gtk::manage(wf->createImage(title));
|
Gtk::Image* titleImage = Gtk::manage(wf->createImage(title));
|
||||||
titleEventBox = Gtk::manage(new Gtk::EventBox());
|
titleBox = Gtk::manage(new Gtk::HBox());
|
||||||
titleEventBox->add(*titleImage);
|
titleBox->add(*titleImage);
|
||||||
|
|
||||||
constructWindow(backgroundColor, cornerImages, resizable);
|
constructWindow(backgroundColor, cornerImages, resizable);
|
||||||
}
|
}
|
||||||
|
@ -90,8 +90,8 @@ WhiteWindow :: WhiteWindow(Glib::ustring title,
|
||||||
titleLabel->modify_font(Pango::FontDescription(
|
titleLabel->modify_font(Pango::FontDescription(
|
||||||
"Bitstream Vera Sans 10"));
|
"Bitstream Vera Sans 10"));
|
||||||
set_title(title);
|
set_title(title);
|
||||||
titleEventBox = Gtk::manage(new Gtk::EventBox());
|
titleBox = Gtk::manage(new Gtk::HBox());
|
||||||
titleEventBox->add(*titleLabel);
|
titleBox->add(*titleLabel);
|
||||||
|
|
||||||
constructWindow(backgroundColor, cornerImages, resizable);
|
constructWindow(backgroundColor, cornerImages, resizable);
|
||||||
}
|
}
|
||||||
|
@ -119,11 +119,11 @@ WhiteWindow :: constructWindow(Colors::ColorName backgroundColor,
|
||||||
Gdk::Color bgColor = Colors::getColor(backgroundColor);
|
Gdk::Color bgColor = Colors::getColor(backgroundColor);
|
||||||
|
|
||||||
// create the title
|
// create the title
|
||||||
titleEventBox->modify_bg(Gtk::STATE_NORMAL, bgColor);
|
titleBox->modify_bg(Gtk::STATE_NORMAL, bgColor);
|
||||||
titleAlignment = Gtk::manage(new Gtk::Alignment(Gtk::ALIGN_LEFT,
|
titleAlignment = Gtk::manage(new Gtk::Alignment(Gtk::ALIGN_LEFT,
|
||||||
Gtk::ALIGN_CENTER,
|
Gtk::ALIGN_CENTER,
|
||||||
0, 0));
|
0, 0));
|
||||||
titleAlignment->add(*titleEventBox);
|
titleAlignment->add(*titleBox);
|
||||||
layout->attach(*titleAlignment, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK);
|
layout->attach(*titleAlignment, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK);
|
||||||
|
|
||||||
// create the minimize, maximize and close buttons
|
// create the minimize, maximize and close buttons
|
||||||
|
@ -177,8 +177,8 @@ WhiteWindow :: constructWindow(Colors::ColorName backgroundColor,
|
||||||
show_all();
|
show_all();
|
||||||
|
|
||||||
// register signal handlers
|
// register signal handlers
|
||||||
titleEventBox->add_events(Gdk::BUTTON_PRESS_MASK);
|
this->add_events(Gdk::BUTTON_PRESS_MASK);
|
||||||
titleEventBox->signal_button_press_event().connect(sigc::mem_fun(*this,
|
this->signal_button_press_event().connect(sigc::mem_fun(*this,
|
||||||
&WhiteWindow::onTitleClicked));
|
&WhiteWindow::onTitleClicked));
|
||||||
|
|
||||||
minimizeButton->signal_clicked().connect(sigc::mem_fun(*this,
|
minimizeButton->signal_clicked().connect(sigc::mem_fun(*this,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue