From 9691e7c936dc24a8a4a54f6b5116af9f35be3ac4 Mon Sep 17 00:00:00 2001 From: Konstantin Baranovskiy Date: Sat, 13 Feb 2021 17:40:09 +0200 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9?= =?UTF-8?q?=D0=BA=D0=B8:=20=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=B2=D0=BD=D0=B5=D1=88=D0=BD=D0=B8=D0=B9=20?= =?UTF-8?q?=D0=B2=D0=B8=D0=B4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bom/Scripts/python/settings.py | 2 +- gbom/Scripts/python/settings.py | 2 +- gspec/Scripts/python/settings.py | 33 ++++++++++++++++++------------ index/Scripts/python/settings.py | 33 ++++++++++++++++++------------ manual/Scripts/python/settings.py | 4 ++-- mexanic/Scripts/python/settings.py | 2 +- spec/Scripts/python/settings.py | 33 ++++++++++++++++++------------ 7 files changed, 65 insertions(+), 44 deletions(-) diff --git a/bom/Scripts/python/settings.py b/bom/Scripts/python/settings.py index 39bc98a..9da994d 100644 --- a/bom/Scripts/python/settings.py +++ b/bom/Scripts/python/settings.py @@ -13,7 +13,7 @@ def setup(*args): context = XSCRIPTCONTEXT.getComponentContext() editControlHeight = 14 - if sys.platform == "linux": + if sys.platform.startswith("linux"): # Элементы управления GTK3 требуют больше места editControlHeight = 20 diff --git a/gbom/Scripts/python/settings.py b/gbom/Scripts/python/settings.py index 445ec70..97088f9 100644 --- a/gbom/Scripts/python/settings.py +++ b/gbom/Scripts/python/settings.py @@ -13,7 +13,7 @@ def setup(*args): context = XSCRIPTCONTEXT.getComponentContext() editControlHeight = 14 - if sys.platform == "linux": + if sys.platform.startswith("linux"): # Элементы управления GTK3 требуют больше места editControlHeight = 20 diff --git a/gspec/Scripts/python/settings.py b/gspec/Scripts/python/settings.py index fff86a6..25bf57a 100644 --- a/gspec/Scripts/python/settings.py +++ b/gspec/Scripts/python/settings.py @@ -13,7 +13,7 @@ def setup(*args): context = XSCRIPTCONTEXT.getComponentContext() editControlHeight = 14 - if sys.platform == "linux": + if sys.platform.startswith("linux"): # Элементы управления GTK3 требуют больше места editControlHeight = 20 @@ -263,7 +263,7 @@ def setup(*args): ) labelModel04.PositionX = 0 labelModel04.PositionY = labelModel03.PositionY + labelModel03.Height - labelModel04.Width = 150 + labelModel04.Width = 120 labelModel04.Height = 16 labelModel04.VerticalAlign = uno.Enum( "com.sun.star.style.VerticalAlignment", @@ -276,10 +276,16 @@ def setup(*args): radioButtonModel00 = pageModel0.createInstance( "com.sun.star.awt.UnoControlRadioButtonModel" ) - radioButtonModel00.PositionX = 150 + radioButtonModel00.PositionX = labelModel04.Width radioButtonModel00.PositionY = labelModel04.PositionY - radioButtonModel00.Width = 75 + radioButtonModel00.Width = 20 radioButtonModel00.Height = labelModel04.Height + if sys.platform.startswith("win"): + radioButtonModel00.Height = radioButtonModel00.Height - 4 + radioButtonModel00.PositionY = radioButtonModel00.PositionY + 4 + else: + radioButtonModel00.Height = radioButtonModel00.Height - 1 + radioButtonModel00.PositionY = radioButtonModel00.PositionY + 1 radioButtonModel00.Name = "RadioButton00" radioButtonModel00.Label = "-" radioButtonModel00.State = 1 if config.get("doc", "ref separator") == '-' else 0 @@ -337,7 +343,7 @@ def setup(*args): "com.sun.star.awt.UnoControlCheckBoxModel" ) checkModel02.PositionX = 5 - checkModel02.PositionY = checkModel01.PositionY + checkModel00.Height + checkModel02.PositionY = checkModel01.PositionY + checkModel01.Height checkModel02.Width = tabsModel.Width - 10 checkModel02.Height = checkModel00.Height checkModel02.Name = "CheckBox02" @@ -358,7 +364,7 @@ def setup(*args): "com.sun.star.awt.UnoControlCheckBoxModel" ) checkModel03.PositionX = 5 - checkModel03.PositionY = checkModel02.PositionY + checkModel00.Height + checkModel03.PositionY = checkModel02.PositionY + checkModel02.Height checkModel03.Width = tabsModel.Width - 10 checkModel03.Height = checkModel00.Height checkModel03.Name = "CheckBox03" @@ -381,7 +387,7 @@ def setup(*args): "com.sun.star.awt.UnoControlCheckBoxModel" ) checkModel04.PositionX = 5 - checkModel04.PositionY = checkModel03.PositionY + checkModel00.Height + checkModel04.PositionY = checkModel03.PositionY + checkModel03.Height checkModel04.Width = tabsModel.Width - 10 checkModel04.Height = checkModel00.Height checkModel04.Name = "CheckBox04" @@ -404,7 +410,7 @@ def setup(*args): "com.sun.star.awt.UnoControlCheckBoxModel" ) checkModel09.PositionX = 5 - checkModel09.PositionY = checkModel04.PositionY + checkModel00.Height + checkModel09.PositionY = checkModel04.PositionY + checkModel04.Height checkModel09.Width = tabsModel.Width - 10 checkModel09.Height = checkModel00.Height checkModel09.Name = "CheckBox09" @@ -422,7 +428,7 @@ def setup(*args): "com.sun.star.awt.UnoControlCheckBoxModel" ) checkModel05.PositionX = 5 - checkModel05.PositionY = checkModel09.PositionY + checkModel00.Height + checkModel05.PositionY = checkModel09.PositionY + checkModel09.Height checkModel05.Width = tabsModel.Width - 10 checkModel05.Height = checkModel00.Height checkModel05.Name = "CheckBox05" @@ -457,10 +463,11 @@ def setup(*args): checkModel06.PositionY = editControlModel04.PositionY checkModel06.Width = editControlModel04.PositionX - 5 checkModel06.Height = editControlHeight - checkModel06.VerticalAlign = uno.Enum( - "com.sun.star.style.VerticalAlignment", - "MIDDLE" - ) + if not sys.platform.startswith("win"): + checkModel06.VerticalAlign = uno.Enum( + "com.sun.star.style.VerticalAlignment", + "MIDDLE" + ) checkModel06.Name = "CheckBox06" checkModel06.State = int(config.getboolean("doc", "append rev table")) checkModel06.Label = "Добавить лист регистрации изменений, если количество листов больше:" diff --git a/index/Scripts/python/settings.py b/index/Scripts/python/settings.py index 1b99076..82ccfcd 100644 --- a/index/Scripts/python/settings.py +++ b/index/Scripts/python/settings.py @@ -13,7 +13,7 @@ def setup(*args): context = XSCRIPTCONTEXT.getComponentContext() editControlHeight = 14 - if sys.platform == "linux": + if sys.platform.startswith("linux"): # Элементы управления GTK3 требуют больше места editControlHeight = 20 @@ -52,7 +52,7 @@ def setup(*args): checkModelSet = dialogModel.createInstance( "com.sun.star.awt.UnoControlCheckBoxModel" ) - checkModelSet.Width = 150 + checkModelSet.Width = 140 checkModelSet.Height = 16 checkModelSet.PositionX = 5 checkModelSet.PositionY = dialogModel.Height - checkModelSet.Height - 4 @@ -304,7 +304,7 @@ def setup(*args): ) labelModel04.PositionX = 0 labelModel04.PositionY = labelModel03.PositionY + labelModel03.Height - labelModel04.Width = 150 + labelModel04.Width = 120 labelModel04.Height = 16 labelModel04.VerticalAlign = uno.Enum( "com.sun.star.style.VerticalAlignment", @@ -317,10 +317,16 @@ def setup(*args): radioButtonModel00 = pageModel0.createInstance( "com.sun.star.awt.UnoControlRadioButtonModel" ) - radioButtonModel00.PositionX = 150 + radioButtonModel00.PositionX = labelModel04.Width radioButtonModel00.PositionY = labelModel04.PositionY - radioButtonModel00.Width = 75 + radioButtonModel00.Width = 20 radioButtonModel00.Height = labelModel04.Height + if sys.platform.startswith("win"): + radioButtonModel00.Height = radioButtonModel00.Height - 4 + radioButtonModel00.PositionY = radioButtonModel00.PositionY + 4 + else: + radioButtonModel00.Height = radioButtonModel00.Height - 1 + radioButtonModel00.PositionY = radioButtonModel00.PositionY + 1 radioButtonModel00.Name = "RadioButton00" radioButtonModel00.Label = "-" radioButtonModel00.State = 1 if config.get("doc", "ref separator") == '-' else 0 @@ -378,7 +384,7 @@ def setup(*args): "com.sun.star.awt.UnoControlCheckBoxModel" ) checkModel02.PositionX = 5 - checkModel02.PositionY = checkModel01.PositionY + checkModel00.Height + checkModel02.PositionY = checkModel01.PositionY + checkModel01.Height checkModel02.Width = tabsModel.Width - 10 checkModel02.Height = checkModel00.Height checkModel02.Name = "CheckBox02" @@ -398,7 +404,7 @@ def setup(*args): "com.sun.star.awt.UnoControlCheckBoxModel" ) checkModel03.PositionX = 5 - checkModel03.PositionY = checkModel02.PositionY + checkModel00.Height + checkModel03.PositionY = checkModel02.PositionY + checkModel02.Height checkModel03.Width = tabsModel.Width - 10 checkModel03.Height = checkModel00.Height checkModel03.Name = "CheckBox03" @@ -421,7 +427,7 @@ def setup(*args): "com.sun.star.awt.UnoControlCheckBoxModel" ) checkModel04.PositionX = 5 - checkModel04.PositionY = checkModel03.PositionY + checkModel00.Height + checkModel04.PositionY = checkModel03.PositionY + checkModel03.Height checkModel04.Width = tabsModel.Width - 10 checkModel04.Height = checkModel00.Height checkModel04.Name = "CheckBox04" @@ -444,7 +450,7 @@ def setup(*args): "com.sun.star.awt.UnoControlCheckBoxModel" ) checkModel05.PositionX = 5 - checkModel05.PositionY = checkModel04.PositionY + checkModel00.Height + checkModel05.PositionY = checkModel04.PositionY + checkModel03.Height checkModel05.Width = tabsModel.Width - 10 checkModel05.Height = checkModel00.Height checkModel05.Name = "CheckBox05" @@ -479,10 +485,11 @@ def setup(*args): checkModel06.PositionY = editControlModel04.PositionY checkModel06.Width = editControlModel04.PositionX - 5 checkModel06.Height = editControlHeight - checkModel06.VerticalAlign = uno.Enum( - "com.sun.star.style.VerticalAlignment", - "MIDDLE" - ) + if not sys.platform.startswith("win"): + checkModel06.VerticalAlign = uno.Enum( + "com.sun.star.style.VerticalAlignment", + "MIDDLE" + ) checkModel06.Name = "CheckBox06" checkModel06.State = int(config.getboolean("doc", "append rev table")) checkModel06.Label = "Добавить лист регистрации изменений, если количество листов больше:" diff --git a/manual/Scripts/python/settings.py b/manual/Scripts/python/settings.py index 109390f..f9188fe 100644 --- a/manual/Scripts/python/settings.py +++ b/manual/Scripts/python/settings.py @@ -11,7 +11,7 @@ def setup(*args): context = XSCRIPTCONTEXT.getComponentContext() editControlHeight = 14 - if sys.platform == "linux": + if sys.platform.startswith("linux"): # Элементы управления GTK3 требуют больше места editControlHeight = 20 @@ -50,7 +50,7 @@ def setup(*args): checkModelSet = dialogModel.createInstance( "com.sun.star.awt.UnoControlCheckBoxModel" ) - checkModelSet.Width = 150 + checkModelSet.Width = 140 checkModelSet.Height = 16 checkModelSet.PositionX = 5 checkModelSet.PositionY = dialogModel.Height - checkModelSet.Height - 4 diff --git a/mexanic/Scripts/python/settings.py b/mexanic/Scripts/python/settings.py index 05761c0..8d19850 100644 --- a/mexanic/Scripts/python/settings.py +++ b/mexanic/Scripts/python/settings.py @@ -13,7 +13,7 @@ def setup(*args): context = XSCRIPTCONTEXT.getComponentContext() editControlHeight = 14 - if sys.platform == "linux": + if sys.platform.startswith("linux"): # Элементы управления GTK3 требуют больше места editControlHeight = 20 diff --git a/spec/Scripts/python/settings.py b/spec/Scripts/python/settings.py index 88561e8..d8e3100 100644 --- a/spec/Scripts/python/settings.py +++ b/spec/Scripts/python/settings.py @@ -13,7 +13,7 @@ def setup(*args): context = XSCRIPTCONTEXT.getComponentContext() editControlHeight = 14 - if sys.platform == "linux": + if sys.platform.startswith("linux"): # Элементы управления GTK3 требуют больше места editControlHeight = 20 @@ -263,7 +263,7 @@ def setup(*args): ) labelModel04.PositionX = 0 labelModel04.PositionY = labelModel03.PositionY + labelModel03.Height - labelModel04.Width = 150 + labelModel04.Width = 120 labelModel04.Height = 16 labelModel04.VerticalAlign = uno.Enum( "com.sun.star.style.VerticalAlignment", @@ -276,10 +276,16 @@ def setup(*args): radioButtonModel00 = pageModel0.createInstance( "com.sun.star.awt.UnoControlRadioButtonModel" ) - radioButtonModel00.PositionX = 150 + radioButtonModel00.PositionX = labelModel04.Width radioButtonModel00.PositionY = labelModel04.PositionY - radioButtonModel00.Width = 75 + radioButtonModel00.Width = 20 radioButtonModel00.Height = labelModel04.Height + if sys.platform.startswith("win"): + radioButtonModel00.Height = radioButtonModel00.Height - 4 + radioButtonModel00.PositionY = radioButtonModel00.PositionY + 4 + else: + radioButtonModel00.Height = radioButtonModel00.Height - 1 + radioButtonModel00.PositionY = radioButtonModel00.PositionY + 1 radioButtonModel00.Name = "RadioButton00" radioButtonModel00.Label = "-" radioButtonModel00.State = 1 if config.get("doc", "ref separator") == '-' else 0 @@ -337,7 +343,7 @@ def setup(*args): "com.sun.star.awt.UnoControlCheckBoxModel" ) checkModel02.PositionX = 5 - checkModel02.PositionY = checkModel01.PositionY + checkModel00.Height + checkModel02.PositionY = checkModel01.PositionY + checkModel01.Height checkModel02.Width = tabsModel.Width - 10 checkModel02.Height = checkModel00.Height checkModel02.Name = "CheckBox02" @@ -358,7 +364,7 @@ def setup(*args): "com.sun.star.awt.UnoControlCheckBoxModel" ) checkModel03.PositionX = 5 - checkModel03.PositionY = checkModel02.PositionY + checkModel00.Height + checkModel03.PositionY = checkModel02.PositionY + checkModel02.Height checkModel03.Width = tabsModel.Width - 10 checkModel03.Height = checkModel00.Height checkModel03.Name = "CheckBox03" @@ -381,7 +387,7 @@ def setup(*args): "com.sun.star.awt.UnoControlCheckBoxModel" ) checkModel04.PositionX = 5 - checkModel04.PositionY = checkModel03.PositionY + checkModel00.Height + checkModel04.PositionY = checkModel03.PositionY + checkModel03.Height checkModel04.Width = tabsModel.Width - 10 checkModel04.Height = checkModel00.Height checkModel04.Name = "CheckBox04" @@ -404,7 +410,7 @@ def setup(*args): "com.sun.star.awt.UnoControlCheckBoxModel" ) checkModel09.PositionX = 5 - checkModel09.PositionY = checkModel04.PositionY + checkModel00.Height + checkModel09.PositionY = checkModel04.PositionY + checkModel04.Height checkModel09.Width = tabsModel.Width - 10 checkModel09.Height = checkModel00.Height checkModel09.Name = "CheckBox09" @@ -422,7 +428,7 @@ def setup(*args): "com.sun.star.awt.UnoControlCheckBoxModel" ) checkModel05.PositionX = 5 - checkModel05.PositionY = checkModel09.PositionY + checkModel00.Height + checkModel05.PositionY = checkModel09.PositionY + checkModel09.Height checkModel05.Width = tabsModel.Width - 10 checkModel05.Height = checkModel00.Height checkModel05.Name = "CheckBox05" @@ -457,10 +463,11 @@ def setup(*args): checkModel06.PositionY = editControlModel04.PositionY checkModel06.Width = editControlModel04.PositionX - 5 checkModel06.Height = editControlHeight - checkModel06.VerticalAlign = uno.Enum( - "com.sun.star.style.VerticalAlignment", - "MIDDLE" - ) + if not sys.platform.startswith("win"): + checkModel06.VerticalAlign = uno.Enum( + "com.sun.star.style.VerticalAlignment", + "MIDDLE" + ) checkModel06.Name = "CheckBox06" checkModel06.State = int(config.getboolean("doc", "append rev table")) checkModel06.Label = "Добавить лист регистрации изменений, если количество листов больше:"