Kaydet (Commit) ac41d4c3 authored tarafından Andre Fischer's avatar Andre Fischer

i122366: Uncheck sidebar menu button after menu is closed.

üst f19d927b
......@@ -109,18 +109,12 @@ void MenuButton::MouseMove (const MouseEvent& rEvent)
void MenuButton::MouseButtonDown (const MouseEvent& rMouseEvent)
{
#if 0
Hide();
CheckBox::MouseButtonDown(rMouseEvent);
Show();
#else
if (rMouseEvent.IsLeft())
{
mbIsLeftButtonDown = true;
CaptureMouse();
Invalidate();
}
#endif
}
......@@ -128,11 +122,6 @@ void MenuButton::MouseButtonDown (const MouseEvent& rMouseEvent)
void MenuButton::MouseButtonUp (const MouseEvent& rMouseEvent)
{
#if 0
Hide();
CheckBox::MouseButtonUp(rMouseEvent);
Show();
#else
if (IsMouseCaptured())
ReleaseMouse();
......@@ -150,7 +139,6 @@ void MenuButton::MouseButtonUp (const MouseEvent& rMouseEvent)
mbIsLeftButtonDown = false;
Invalidate();
}
#endif
}
......
......@@ -379,6 +379,9 @@ void TabBar::UpdateFocusManager (FocusManager& rFocusManager)
IMPL_LINK(TabBar, OnToolboxClicked, void*, EMPTYARG)
{
if ( ! mpMenuButton)
return 0;
::std::vector<DeckMenuData> aMenuData;
for(ItemContainer::const_iterator iItem(maItems.begin()),iEnd(maItems.end());
......@@ -404,6 +407,7 @@ IMPL_LINK(TabBar, OnToolboxClicked, void*, EMPTYARG)
mpMenuButton->GetPosPixel(),
mpMenuButton->GetSizePixel()),
aMenuData);
mpMenuButton->Check(sal_False);
return 0;
}
......
......@@ -34,6 +34,7 @@
#include <boost/scoped_ptr.hpp>
class Button;
class CheckBox;
class RadioButton;
namespace css = ::com::sun::star;
......@@ -98,7 +99,7 @@ public:
private:
cssu::Reference<css::frame::XFrame> mxFrame;
::boost::scoped_ptr<Button> mpMenuButton;
::boost::scoped_ptr<CheckBox> mpMenuButton;
class Item
{
public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment