projects
/
gpl
/
argeo-suite.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9ab716f
)
Improve styling.
author
Mathieu Baudier <mbaudier@argeo.org>
Sun, 14 Feb 2021 10:02:55 +0000
(11:02 +0100)
committer
Mathieu Baudier <mbaudier@argeo.org>
Sun, 14 Feb 2021 10:02:55 +0000
(11:02 +0100)
core/org.argeo.suite.ui/src/org/argeo/suite/ui/DefaultEditionLayer.java
patch
|
blob
|
history
core/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java
patch
|
blob
|
history
core/org.argeo.suite.ui/src/org/argeo/suite/ui/widgets/TabbedArea.java
patch
|
blob
|
history
publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/AbstractDbkViewer.java
patch
|
blob
|
history
diff --git
a/core/org.argeo.suite.ui/src/org/argeo/suite/ui/DefaultEditionLayer.java
b/core/org.argeo.suite.ui/src/org/argeo/suite/ui/DefaultEditionLayer.java
index d017ee7d7f5f0a33897bfe66085dd8b289aa1853..68081b4e646d944b9066c855f98cdc941b48f2ff 100644
(file)
--- a/
core/org.argeo.suite.ui/src/org/argeo/suite/ui/DefaultEditionLayer.java
+++ b/
core/org.argeo.suite.ui/src/org/argeo/suite/ui/DefaultEditionLayer.java
@@
-105,9
+105,9
@@
public class DefaultEditionLayer implements SuiteLayer {
}
public void destroy(BundleContext bundleContext, Map<String, String> properties) {
}
public void destroy(BundleContext bundleContext, Map<String, String> properties) {
-
+
}
}
-
+
public void setEntryArea(CmsUiProvider entryArea) {
this.entryArea = entryArea;
}
public void setEntryArea(CmsUiProvider entryArea) {
this.entryArea = entryArea;
}
@@
-159,7
+159,11
@@
public class DefaultEditionLayer implements SuiteLayer {
}
if (startMaximized)
setMaximizedControl(editorArea);
}
if (startMaximized)
setMaximizedControl(editorArea);
- editorArea.setLayout(new GridLayout());
+ GridLayout editorAreaLayout = new GridLayout();
+ editorAreaLayout.verticalSpacing = 0;
+ editorAreaLayout.marginBottom = 0;
+ editorAreaLayout.marginHeight = 0;
+ editorArea.setLayout(editorAreaLayout);
if (DefaultEditionLayer.this.workArea == null) {
tabbedArea = createTabbedArea(editorArea, theme);
if (DefaultEditionLayer.this.workArea == null) {
tabbedArea = createTabbedArea(editorArea, theme);
diff --git
a/core/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java
b/core/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java
index 52a2fd6c0f2894adca62bf7e6042a24c1b80933b..816c65818605761c73d4713d3fda98471ba48806 100644
(file)
--- a/
core/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java
+++ b/
core/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java
@@
-56,7
+56,7
@@
class SuiteUi extends Composite {
footer = new Composite(this, SWT.NONE);
footer.setLayout(CmsUiUtils.noSpaceGridLayout());
footer = new Composite(this, SWT.NONE);
footer.setLayout(CmsUiUtils.noSpaceGridLayout());
- CmsUiUtils.style(
header, SuiteStyle.head
er);
+ CmsUiUtils.style(
footer, SuiteStyle.foot
er);
footer.setLayoutData(CmsUiUtils.fillWidth());
}
footer.setLayoutData(CmsUiUtils.fillWidth());
}
diff --git
a/core/org.argeo.suite.ui/src/org/argeo/suite/ui/widgets/TabbedArea.java
b/core/org.argeo.suite.ui/src/org/argeo/suite/ui/widgets/TabbedArea.java
index e1cf15451d4b35cf0662070e05166a798001cdb0..8ce5fedb736249fd9581c885f6d740bc224641b8 100644
(file)
--- a/
core/org.argeo.suite.ui/src/org/argeo/suite/ui/widgets/TabbedArea.java
+++ b/
core/org.argeo.suite.ui/src/org/argeo/suite/ui/widgets/TabbedArea.java
@@
-91,7
+91,9
@@
public class TabbedArea extends Composite {
title.setLayoutData(CmsUiUtils.fillWidth());
title.addSelectionListener((Selected) (e) -> showTab(tabIndex(section.getNode())));
Node node = section.getNode();
title.setLayoutData(CmsUiUtils.fillWidth());
title.addSelectionListener((Selected) (e) -> showTab(tabIndex(section.getNode())));
Node node = section.getNode();
- title.setText(Jcr.getTitle(node));
+ String titleStr = Jcr.getTitle(node);
+ // TODO internationalize
+ title.setText(titleStr);
if (!singleTab) {
ToolBar toolBar = new ToolBar(sectionHeader, SWT.NONE);
ToolItem closeItem = new ToolItem(toolBar, SWT.FLAT);
if (!singleTab) {
ToolBar toolBar = new ToolBar(sectionHeader, SWT.NONE);
ToolItem closeItem = new ToolItem(toolBar, SWT.FLAT);
diff --git
a/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/AbstractDbkViewer.java
b/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/AbstractDbkViewer.java
index 814cfb3415e129dcdc28164e27ad72f03d7f78ed..d886b143bde568b1bc31172023eb0c323a1a6ae5 100644
(file)
--- a/
publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/AbstractDbkViewer.java
+++ b/
publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/AbstractDbkViewer.java
@@
-75,6
+75,7
@@
public abstract class AbstractDbkViewer extends AbstractPageViewer implements Ke
private boolean showMainTitle = true;
private Integer maxMediaWidth = null;
private boolean showMainTitle = true;
private Integer maxMediaWidth = null;
+ private String defaultSectionStyle;
protected AbstractDbkViewer(Section parent, int style, CmsEditable cmsEditable) {
super(parent, style, cmsEditable);
protected AbstractDbkViewer(Section parent, int style, CmsEditable cmsEditable) {
super(parent, style, cmsEditable);
@@
-106,6
+107,11
@@
public abstract class AbstractDbkViewer extends AbstractPageViewer implements Ke
CmsUiUtils.clear(section);
Node node = section.getNode();
TextSection textSection = (TextSection) section;
CmsUiUtils.clear(section);
Node node = section.getNode();
TextSection textSection = (TextSection) section;
+ String style = node.hasProperty(DbkAttr.role.name()) ? node.getProperty(DbkAttr.role.name()).getString()
+ : getDefaultSectionStyle();
+ if (style != null)
+ CmsUiUtils.style(textSection, style);
+
if (node.hasNode(DbkType.title.get())) {
boolean showTitle = getMainSection() == section ? showMainTitle : true;
if (showTitle) {
if (node.hasNode(DbkType.title.get())) {
boolean showTitle = getMainSection() == section ? showMainTitle : true;
if (showTitle) {
@@
-946,6
+952,14
@@
public abstract class AbstractDbkViewer extends AbstractPageViewer implements Ke
this.showMainTitle = showMainTitle;
}
this.showMainTitle = showMainTitle;
}
+ public String getDefaultSectionStyle() {
+ return defaultSectionStyle;
+ }
+
+ public void setDefaultSectionStyle(String defaultSectionStyle) {
+ this.defaultSectionStyle = defaultSectionStyle;
+ }
+
// FILE UPLOAD LISTENER
private class FUL implements FileUploadListener {
public void uploadProgress(FileUploadEvent event) {
// FILE UPLOAD LISTENER
private class FUL implements FileUploadListener {
public void uploadProgress(FileUploadEvent event) {