Improve UX.
authorMathieu Baudier <mbaudier@argeo.org>
Fri, 9 Oct 2020 17:28:09 +0000 (19:28 +0200)
committerMathieu Baudier <mbaudier@argeo.org>
Fri, 9 Oct 2020 17:28:09 +0000 (19:28 +0200)
org.argeo.suite.theme.default/icons/types/16/close.png
org.argeo.suite.theme.default/icons/types/32/close.png
org.argeo.suite.theme.default/rap/work.css
org.argeo.suite.ui/src/org/argeo/suite/ui/ArgeoSuiteUi.java
org.argeo.suite.ui/src/org/argeo/suite/ui/DefaultLeadPane.java
org.argeo.suite.ui/src/org/argeo/suite/ui/RecentItems.java
org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteStyle.java

index 29d82f5ec2c458d27fbd3140b753947472c5ae7a..af85e1ad1560e32c0bbdba6aae638722b5220a99 100644 (file)
Binary files a/org.argeo.suite.theme.default/icons/types/16/close.png and b/org.argeo.suite.theme.default/icons/types/16/close.png differ
index acf77237eff73681f8806d4aca1c4250fafeb77e..d0729a5cdbb681986f544fc78b26adf416530ef3 100644 (file)
Binary files a/org.argeo.suite.theme.default/icons/types/32/close.png and b/org.argeo.suite.theme.default/icons/types/32/close.png differ
index fbd1180d68d5af7e4d5b0e8ce75ea75f162e3fd4..937d2992ced2e914b25163149f2fe74b550a17eb 100644 (file)
 }
 
 .argeo-suite-leadPane {
-       font: bold 14px sans-serif;
-       background-color:#ddd;
+       background-color: #eee;
 }
 
-Button.argeo-suite-leadPane {
-       font: bold 14px sans-serif;
-       color: white;
-       background-color: white;
+Label.argeo-suite-leadPane {
+       font: 14px sans-serif;
+       color: #888;
+       background-color: #eee;
+}
+
+Button.argeo-suite-leadPane:hover {
+       cursor:pointer;
 }
 
 .argeo-suite-recentItems {
@@ -45,59 +48,74 @@ Button.argeo-suite-leadPane {
 }
 
 .argeo-suite-simpleLabel {
-       font:bold 14px sans-serif;
-       padding:0 0 0 8px;
+       font: bold 14px sans-serif;
+       padding: 0 0 0 8px;
 }
 
 .argeo-suite-simpleText {
+       
 }
 
-.argeo-suite-titleCell{
-       font:bold 14px sans-serif;
-       background-color:#ddd;
+.argeo-suite-titleCell {
+       font: bold 14px sans-serif;
+       background-color: #ddd;
 }
 
 .argeo-suite-inlineButton {
-       padding:0px 4px;
+       padding: 0px 4px;
        font: 12px sans-serif;
-       border:1px solid white;
-       color:white;
-       background-image:none;
-       background-color:#00294b;
+       border: 1px solid white;
+       color: white;
+       background-image: none;
+       background-color: #00294b;
 }
 
 .argeo-suite-inlineButton:hover {
-       color:#00294b;
-       background-color:white;
+       color: #00294b;
+       background-color: white;
 }
 
-
+Composite.argeo-suite-mainTabBody {
+       background-color: #eee;
+       border: 1px solid #bbb;
+}
 
 .argeo-suite-mainTab {
-       background-color:#ddd;
-       border:1px solid #bbb;
+       background-color: #eee;
+       border: 1px solid #bbb;
+}
+
+ToolItem.argeo-suite-mainTab {
+       border: none;
+       background-color: #eee;
 }
 
 Button.argeo-suite-mainTab {
-       border:none;
-       background-color:#ddd;
+       border: none;
+       background-color: #eee;
 }
 
 .argeo-suite-mainTab:hover {
-       background-color:#eee;
+       background-color: #eee;
 }
 
 Button.argeo-suite-mainTab:hover {
-       cursor:pointer;
-       background-color:#eee;
+       cursor: pointer;
+       background-color: #eee;
 }
 
 .argeo-suite-mainTabSelected {
-       font:bold 14px sans-serif;
-       color:white;
-       background-color:#00294b;
+       font: bold 14px sans-serif;
+       color: white;
+       /*background-color: #00294b;*/
+       background-color: #5882b5;
+       border: 1px solid #00294b;
 }
 
-Button.argeo-suite-mainTabSelected {
-       border:none;
+ToolItem.argeo-suite-mainTabSelected {
+       border: none;
 }
+
+Button.argeo-suite-mainTabSelected {
+       border: none;
+}
\ No newline at end of file
index e6f38a3451e876a27e7fc4a6cd69f6b3119128a6..d74dc21aa4c7463d6650b15805f1c3625b75e2d8 100644 (file)
@@ -151,9 +151,11 @@ public class ArgeoSuiteUi extends Composite {
                        }
                        int[] weights = new int[] { 2000, 8000 };
                        area.setWeights(weights);
+//                     editorArea.setLayout(CmsUiUtils.noSpaceGridLayout());
                        editorArea.setLayout(new GridLayout());
 
                        tabbedArea = new TabbedArea(editorArea, SWT.NONE);
+                       tabbedArea.setBodyStyle(SuiteStyle.mainTabBody.toStyleClass());
                        tabbedArea.setTabStyle(SuiteStyle.mainTab.toStyleClass());
                        tabbedArea.setTabSelectedStyle(SuiteStyle.mainTabSelected.toStyleClass());
                        tabbedArea.setCloseIcon(SuiteIcon.close.getSmallIcon(theme));
index 931f5a1ec1f8590c30de95e78ff9ac885e4e271f..6c6047492901242c8e1e1f5058aa87b42af521c5 100644 (file)
@@ -14,10 +14,12 @@ import org.argeo.cms.ui.CmsView;
 import org.argeo.cms.ui.util.CmsIcon;
 import org.argeo.cms.ui.util.CmsUiUtils;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
 
 /** Side pane listing various perspectives. */
 public class DefaultLeadPane implements CmsUiProvider {
@@ -46,8 +48,13 @@ public class DefaultLeadPane implements CmsUiProvider {
                CmsTheme theme = CmsTheme.getCmsTheme(parent);
                Button button = new Button(parent, SWT.PUSH);
                CmsUiUtils.style(button, SuiteStyle.leadPane);
-               button.setToolTipText(msg.lead());
                button.setImage(icon.getBigIcon(theme));
+               button.setLayoutData(new GridData(SWT.CENTER, SWT.BOTTOM, true, false));
+               //button.setToolTipText(msg.lead());
+               Label lbl = new Label(parent,SWT.NONE);
+               CmsUiUtils.style(lbl, SuiteStyle.leadPane);
+               lbl.setText(msg.lead());
+               lbl.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, true, false));
                CmsUiUtils.sendEventOnSelect(button, SuiteEvent.switchLayer.topic(), SuiteEvent.LAYER, layer);
                return button;
        }
index 09480ba5a226096d1e145665a1f21755cba8b9a6..0c08d2d9335845a2ee77a5baf99746cda2e671a0 100644 (file)
@@ -63,20 +63,22 @@ public class RecentItems implements CmsUiProvider {
        public Control createUi(Composite parent, Node context) throws RepositoryException {
                theme = CmsTheme.getCmsTheme(parent);
                parent.setLayout(new GridLayout());
+//             parent.setLayout(CmsUiUtils.noSpaceGridLayout());
+               parent.setLayout(new GridLayout());
 
-               Composite top = new Composite(parent, SWT.NONE);
-               CmsUiUtils.style(top, SuiteStyle.recentItems);
-               top.setLayoutData(CmsUiUtils.fillWidth());
-               top.setLayout(CmsUiUtils.noSpaceGridLayout(2));
-               Label lbl = new Label(top, SWT.NONE);
-               lbl.setLayoutData(CmsUiUtils.fillAll());
-               lbl.setText(SuiteMsg.recentItems.lead());
-               CmsUiUtils.style(lbl, SuiteStyle.recentItems);
-
-               ToolBar topToolBar = new ToolBar(top, SWT.NONE);
-               ToolItem addItem = new ToolItem(topToolBar, SWT.FLAT);
-//             CmsUiUtils.style(addItem, SuiteStyle.recentItems);
-               addItem.setImage(SuiteIcon.add.getSmallIcon(theme));
+//             Composite top = new Composite(parent, SWT.BORDER);
+//             CmsUiUtils.style(top, SuiteStyle.recentItems);
+//             top.setLayoutData(CmsUiUtils.fillWidth());
+//             top.setLayout(CmsUiUtils.noSpaceGridLayout(2));
+//             Label lbl = new Label(top, SWT.FLAT);
+//             lbl.setLayoutData(CmsUiUtils.fillWidth());
+//             lbl.setText(SuiteMsg.recentItems.lead());
+//             CmsUiUtils.style(lbl, SuiteStyle.recentItems);
+//
+//             ToolBar topToolBar = new ToolBar(top, SWT.NONE);
+//             ToolItem addItem = new ToolItem(topToolBar, SWT.FLAT);
+////           CmsUiUtils.style(addItem, SuiteStyle.recentItems);
+//             addItem.setImage(SuiteIcon.add.getSmallIcon(theme));
 
                if (context == null)
                        return null;
@@ -93,7 +95,8 @@ public class RecentItems implements CmsUiProvider {
                deleteItem.setEnabled(false);
 //             CmsUiUtils.style(deleteItem, SuiteStyle.recentItems);
                deleteItem.setImage(SuiteIcon.delete.getSmallIcon(theme));
-
+               ToolItem addItem = new ToolItem(bottomToolBar, SWT.FLAT);
+               addItem.setImage(SuiteIcon.add.getSmallIcon(theme));
                entityViewer.getViewer().addDoubleClickListener(new IDoubleClickListener() {
 
                        @Override
@@ -212,7 +215,8 @@ public class RecentItems implements CmsUiProvider {
                }
 
                protected TableViewer createListPart(Composite parent, ILabelProvider labelProvider) {
-                       parent.setLayout(new GridLayout());
+//                     parent.setLayout(new GridLayout());
+//                     parent.setLayout(CmsUiUtils.noSpaceGridLayout());
 
                        Composite tableComposite = new Composite(parent, SWT.NONE);
                        GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_VERTICAL
index b49c0e074c3f459a3f1438595c8895c1cf2ee132..4e825ece20f7add51df43e3b6deefd27eec8660f 100644 (file)
@@ -17,7 +17,7 @@ public enum SuiteStyle implements CmsStyle {
        // table
        titleCell,
        // tabbed area
-       mainTabSelected, mainTab,
+       mainTabBody,mainTabSelected, mainTab,
        // Buttons
        inlineButton;