Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Furnadjiev2016-11-10 10:44:24 +0000
committerGerrit Code Review @ Eclipse.org2016-11-11 11:16:55 +0000
commit6e6ad4f39a813773610faebf63d92da4da6e06fa (patch)
tree501cacf0b0b4f8ac67e759705242c345e31db4d0 /bundles
parent75d863544644b5702407d3706133e8a439a515de (diff)
downloadorg.eclipse.rap-6e6ad4f39a813773610faebf63d92da4da6e06fa.tar.gz
org.eclipse.rap-6e6ad4f39a813773610faebf63d92da4da6e06fa.tar.xz
org.eclipse.rap-6e6ad4f39a813773610faebf63d92da4da6e06fa.zip
Add themeable padding property to Label
430607: [theming] [Label] [Link] missing padding property https://bugs.eclipse.org/bugs/show_bug.cgi?id=430607 Change-Id: I3dc2a7aaf59a391b56278b660f7de55756775c59
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.rap.rwt/resources/resource/theme/default.css1
-rw-r--r--bundles/org.eclipse.rap.rwt/src/org/eclipse/swt/widgets/Label.java7
-rw-r--r--bundles/org.eclipse.rap.rwt/widgetkits/org/eclipse/swt/internal/widgets/labelkit/Label.appearances.js3
-rw-r--r--bundles/org.eclipse.rap.rwt/widgetkits/org/eclipse/swt/internal/widgets/labelkit/Label.default.css3
-rw-r--r--bundles/org.eclipse.rap.rwt/widgetkits/org/eclipse/swt/internal/widgets/labelkit/Label.theme.xml5
5 files changed, 13 insertions, 6 deletions
diff --git a/bundles/org.eclipse.rap.rwt/resources/resource/theme/default.css b/bundles/org.eclipse.rap.rwt/resources/resource/theme/default.css
index 77a203de9e..53ddde97da 100644
--- a/bundles/org.eclipse.rap.rwt/resources/resource/theme/default.css
+++ b/bundles/org.eclipse.rap.rwt/resources/resource/theme/default.css
@@ -548,6 +548,7 @@ Label {
cursor: default;
opacity: 1;
text-shadow: none;
+ padding: 0;
}
Label[BORDER] {
diff --git a/bundles/org.eclipse.rap.rwt/src/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.rap.rwt/src/org/eclipse/swt/widgets/Label.java
index b19d2272f4..95b5c57c7a 100644
--- a/bundles/org.eclipse.rap.rwt/src/org/eclipse/swt/widgets/Label.java
+++ b/bundles/org.eclipse.rap.rwt/src/org/eclipse/swt/widgets/Label.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2015 Innoopract Informationssysteme GmbH and others.
+ * Copyright (c) 2002, 2016 Innoopract Informationssysteme GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -306,8 +306,9 @@ public class Label extends Control {
height = hHint;
}
BoxDimensions border = getBorder();
- width += border.left + border.right;
- height += border.top + border.bottom;
+ BoxDimensions padding = getPadding();
+ width += border.left + border.right + padding.left + padding.right;
+ height += border.top + border.bottom + padding.top + padding.bottom;
return new Point( width, height );
}
diff --git a/bundles/org.eclipse.rap.rwt/widgetkits/org/eclipse/swt/internal/widgets/labelkit/Label.appearances.js b/bundles/org.eclipse.rap.rwt/widgetkits/org/eclipse/swt/internal/widgets/labelkit/Label.appearances.js
index a9bff80a13..5e32869cd8 100644
--- a/bundles/org.eclipse.rap.rwt/widgetkits/org/eclipse/swt/internal/widgets/labelkit/Label.appearances.js
+++ b/bundles/org.eclipse.rap.rwt/widgetkits/org/eclipse/swt/internal/widgets/labelkit/Label.appearances.js
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2014 Innoopract Informationssysteme GmbH and others.
+ * Copyright (c) 2007, 2016 Innoopract Informationssysteme GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -37,6 +37,7 @@ var appearances = {
result.border = tv.getCssBorder( "Label", "border" );
result.cursor = tv.getCssCursor( "Label", "cursor" );
result.opacity = tv.getCssFloat( "Label", "opacity" );
+ result.padding = tv.getCssBoxDimensions( "Label", "padding" );
result.textShadow = tv.getCssShadow( "Label", "text-shadow" );
return result;
}
diff --git a/bundles/org.eclipse.rap.rwt/widgetkits/org/eclipse/swt/internal/widgets/labelkit/Label.default.css b/bundles/org.eclipse.rap.rwt/widgetkits/org/eclipse/swt/internal/widgets/labelkit/Label.default.css
index 8b214ad74e..fbda678c12 100644
--- a/bundles/org.eclipse.rap.rwt/widgetkits/org/eclipse/swt/internal/widgets/labelkit/Label.default.css
+++ b/bundles/org.eclipse.rap.rwt/widgetkits/org/eclipse/swt/internal/widgets/labelkit/Label.default.css
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2013 Innoopract Informationssysteme GmbH and others.
+ * Copyright (c) 2008, 2016 Innoopract Informationssysteme GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -25,6 +25,7 @@ Label {
cursor: default;
opacity: 1;
text-shadow: none;
+ padding: 0;
}
Label[BORDER] {
diff --git a/bundles/org.eclipse.rap.rwt/widgetkits/org/eclipse/swt/internal/widgets/labelkit/Label.theme.xml b/bundles/org.eclipse.rap.rwt/widgetkits/org/eclipse/swt/internal/widgets/labelkit/Label.theme.xml
index 07af8fdee5..d65aceaf9e 100644
--- a/bundles/org.eclipse.rap.rwt/widgetkits/org/eclipse/swt/internal/widgets/labelkit/Label.theme.xml
+++ b/bundles/org.eclipse.rap.rwt/widgetkits/org/eclipse/swt/internal/widgets/labelkit/Label.theme.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
- Copyright (c) 2008, 2014 Innoopract Informationssysteme GmbH and other.
+ Copyright (c) 2008, 2016 Innoopract Informationssysteme GmbH and other.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
@@ -71,6 +71,9 @@
<property name="text-shadow"
description="Shadow for text." />
+ <property name="padding"
+ description="Padding (inner distance) for labels." />
+
<style name="BORDER"
description="Indicates that the widget should have a border." />

Back to the top