Skip to content

Commit

Permalink
Fix various issues such as #68 and #70
Browse files Browse the repository at this point in the history
  • Loading branch information
maoschanz committed Jul 28, 2019
1 parent f588bc7 commit fcdb9bd
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion deb_package.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

DISTRO="unstable" # TODO lister les valeurs possibles
DISTRO="unstable" # TODO lister les valeurs possibles (debian ? ubuntu ? elementary ?)
PACKAGE_NAME="drawing" # TODO et pour elementary ?
VERSION="0.4"

Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Homepage: https://maoschanz.github.io/drawing/

Package: drawing
Architecture: any
Depends: python3-gi, python3-gi-cairo, gir1.2-gtk-3.0
Depends: python3-gi (>=3.30.0), python3-gi-cairo (>=3.30.0), gir1.2-gtk-3.0 (>=3.24.0)
Description: A drawing application for the GNOME desktop.
A simple application to draw or edit pictures.
It includes tools like: Pencil, Selection, Shape, Text, …
2 changes: 1 addition & 1 deletion help/C/selection_tools.page
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<title>Selection</title>

<p>The <gui style="button">Select</gui> tool, which is available from the side
<p>The <gui style="button">Selection</gui> tool, which is available from the side
bar (along with <link xref="drawing_tools">the other tools</link>), allows you
to define a part of the image.</p>

Expand Down
3 changes: 1 addition & 2 deletions po/ru.po
Original file line number Diff line number Diff line change
Expand Up @@ -552,11 +552,10 @@ msgstr "Размер инструмента"
msgid "No options"
msgstr ""

#. <property name="relief">none</property>
#: src/ui/window.ui:220 src/ui/window.ui:238 src/tools/ui/tool_select.ui:259
#: src/tools/ui/tool_select.ui:277
msgid "Preview"
msgstr "Предварительный просмотр"
msgstr "Предпросмотр"

#: src/ui/win-menus.ui:21
#, fuzzy
Expand Down
2 changes: 1 addition & 1 deletion src/tools/selection_tools/tool_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self, window, **kwargs):
self.window.bottom_panel_box.add(self.bottom_panel)
self.implements_panel = True
# self.needed_width_for_long = XXX TODO currently harcoded
self.needed_width_for_long = 400
self.needed_width_for_long = 450

############################################################################
# UI implementations #######################################################
Expand Down
17 changes: 12 additions & 5 deletions src/ui/window.ui
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,20 @@
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<child>
<object class="GtkScrolledWindow" id="tools_scrollable_box">
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="vscrollbar-policy">automatic</property>
<property name="vscrollbar-policy">external</property>
<property name="hscrollbar-policy">never</property>
<!-- <child> -->
<!-- the flowbox will move here if needed -->
<!-- </child> -->
<child>
<object class="GtkBox" id="tools_scrollable_box">
<property name="visible">True</property>
<property name="expand">False</property>
<property name="halign">center</property>
<!-- <child> -->
<!-- the flowbox will move here if needed -->
<!-- </child> -->
</object>
</child>
</object>
</child>
<child>
Expand Down
15 changes: 6 additions & 9 deletions src/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,17 +634,14 @@ def set_tools_labels_visibility(self, visible):
self.tools[tool_id].label_widget.set_visible(visible)
nb_tools = len(self.tools)
if visible:
if self.tools_panel.get_parent() is self.tools_nonscrollable_box:
self.tools_nonscrollable_box.remove(self.tools_panel)
self.tools_scrollable_box.add(self.tools_panel)
self.tools_panel.set_min_children_per_line(nb_tools)
self.tools_nonscrollable_box.remove(self.tools_panel)
self.tools_scrollable_box.add(self.tools_panel)
else:
if self.tools_panel.get_parent() is self.tools_scrollable_box:
self.tools_scrollable_box.remove(self.tools_panel)
self.tools_nonscrollable_box.add(self.tools_panel)
# FIXME largeur des boutons pétée
nb_tools = len(self.tools)
self.tools_panel.set_min_children_per_line( (nb_tools+(nb_tools % 3))/3 )
self.tools_scrollable_box.remove(self.tools_panel)
self.tools_nonscrollable_box.add(self.tools_panel)
nb_min = int( (nb_tools+(nb_tools % 3))/3 ) - 1
self.tools_panel.set_min_children_per_line(nb_min)
self.tools_panel.set_max_children_per_line(nb_tools)

def on_show_labels_setting_changed(self, *args):
Expand Down

0 comments on commit fcdb9bd

Please sign in to comment.