[ocrfeeder] Fix the width for the boxes editor
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ocrfeeder] Fix the width for the boxes editor
- Date: Sun, 11 Mar 2018 13:38:09 +0000 (UTC)
commit c4d4c4afb4b73019c08e2d1ff66b780cb017f0b5
Author: Joaquim Rocha <me joaquimrocha com>
Date: Sat Nov 19 19:20:32 2016 +0100
Fix the width for the boxes editor
This makes the box editor be 300px wide when it shows up instead of
having it expand to the parent GtkPaned's separator position.
src/ocrfeeder/studio/widgetModeler.py | 3 +--
src/ocrfeeder/studio/widgetPresenter.py | 2 ++
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/ocrfeeder/studio/widgetModeler.py b/src/ocrfeeder/studio/widgetModeler.py
index f94184e..d2b0f1b 100644
--- a/src/ocrfeeder/studio/widgetModeler.py
+++ b/src/ocrfeeder/studio/widgetModeler.py
@@ -61,7 +61,6 @@ class ImageReviewer(Gtk.Paned):
self.selectable_boxes_area.connect('deselected_box',
self.deselectedBoxCb)
self.image_pixbuf = GdkPixbuf.Pixbuf.new_from_file(self.path_to_image)
- self.set_position(500)
self.show()
self.ocr_engines = ocr_engines
self.editor = Editor(self.image_pixbuf, self.ocr_engines, self)
@@ -76,7 +75,7 @@ class ImageReviewer(Gtk.Paned):
selectable_boxes_scrolled_window.show()
self.pack1(selectable_boxes_scrolled_window, True, False)
- self.pack2(self.editor.box_editor, True, False)
+ self.pack2(self.editor.box_editor, False, True)
self.page = page_data
self.updatePageData(self.page)
selectable_boxes_scrolled_window.connect_after("size-allocate", self.zoomFitCb)
diff --git a/src/ocrfeeder/studio/widgetPresenter.py b/src/ocrfeeder/studio/widgetPresenter.py
index 240f4f0..b06fcbf 100644
--- a/src/ocrfeeder/studio/widgetPresenter.py
+++ b/src/ocrfeeder/studio/widgetPresenter.py
@@ -325,6 +325,8 @@ class BoxEditor(Gtk.ScrolledWindow):
def __init__(self, image_width = 0, image_height = 0, pixbuf = 0, x = 0, y = 0, width = 0, height = 0,
ocr_engines_list = []):
super(BoxEditor, self).__init__()
+
+ self.set_size_request(300, -1)
self.get_accessible().set_name(_('Area editor'))
self.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
self.contents = Gtk.VBox()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]