[niepce] Make Dock scrollable (actually a scrolled Window)
- From: Hubert FiguiÃre <hub src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [niepce] Make Dock scrollable (actually a scrolled Window)
- Date: Sat, 12 Nov 2011 06:16:30 +0000 (UTC)
commit 33430fe9db386784aecd9bf2d99c9796ecc19b10
Author: Hub Figuiere <hub figuiere net>
Date: Sun Nov 6 09:40:25 2011 -0800
Make Dock scrollable (actually a scrolled Window)
src/fwk/toolkit/widgets/dock.cpp | 12 ++++++++++++
src/fwk/toolkit/widgets/dock.hpp | 10 ++++++++--
src/niepce/modules/darkroom/darkroommodule.cpp | 2 +-
src/niepce/ui/gridviewmodule.cpp | 2 +-
4 files changed, 22 insertions(+), 4 deletions(-)
---
diff --git a/src/fwk/toolkit/widgets/dock.cpp b/src/fwk/toolkit/widgets/dock.cpp
index c06a25d..f081ced 100644
--- a/src/fwk/toolkit/widgets/dock.cpp
+++ b/src/fwk/toolkit/widgets/dock.cpp
@@ -20,4 +20,16 @@
#include "dock.hpp"
+namespace fwk {
+
+
+Dock::Dock()
+{
+ set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_ALWAYS);
+ add(m_vbox);
+}
+
+}
+
+
diff --git a/src/fwk/toolkit/widgets/dock.hpp b/src/fwk/toolkit/widgets/dock.hpp
index dc86f9a..22634d5 100644
--- a/src/fwk/toolkit/widgets/dock.hpp
+++ b/src/fwk/toolkit/widgets/dock.hpp
@@ -21,16 +21,22 @@
#define __FWK_TOOLKIT_DOCK_HPP__
#include <gtkmm/box.h>
+#include <gtkmm/scrolledwindow.h>
+
namespace fwk {
class Dock
- : public Gtk::VBox
+ : public Gtk::ScrolledWindow
{
public:
-
+ Dock();
+ Gtk::VBox & vbox()
+ { return m_vbox; }
+private:
+ Gtk::VBox m_vbox;
};
diff --git a/src/niepce/modules/darkroom/darkroommodule.cpp b/src/niepce/modules/darkroom/darkroommodule.cpp
index 31d451f..505abee 100644
--- a/src/niepce/modules/darkroom/darkroommodule.cpp
+++ b/src/niepce/modules/darkroom/darkroommodule.cpp
@@ -91,7 +91,7 @@ Gtk::Widget * DarkroomModule::buildWidget(const Glib::RefPtr<Gtk::UIManager> & m
m_toolbox_ctrl = ToolboxController::Ptr(new ToolboxController);
add(m_toolbox_ctrl);
- m_dock->pack_start(*m_toolbox_ctrl->buildWidget(manager));
+ m_dock->vbox().pack_start(*m_toolbox_ctrl->buildWidget(manager));
return m_widget;
}
diff --git a/src/niepce/ui/gridviewmodule.cpp b/src/niepce/ui/gridviewmodule.cpp
index 01457c9..885a1b7 100644
--- a/src/niepce/ui/gridviewmodule.cpp
+++ b/src/niepce/ui/gridviewmodule.cpp
@@ -113,7 +113,7 @@ Gtk::Widget * GridViewModule::buildWidget(const Glib::RefPtr<Gtk::UIManager> & m
m_metapanecontroller = MetaDataPaneController::Ptr(new MetaDataPaneController);
add(m_metapanecontroller);
m_lib_splitview.pack2(*m_dock);
- m_dock->pack_start(*m_metapanecontroller->buildWidget(manager));
+ m_dock->vbox().pack_start(*m_metapanecontroller->buildWidget(manager));
m_databinders.add_binder(new fwk::ConfigDataBinder<int>(
m_lib_splitview.property_position(),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]