From 6e6587a7d5ea5a20c9dd569778eb1d72307b76c9 Mon Sep 17 00:00:00 2001 From: Ivan Furnadjiev Date: Mon, 6 Feb 2017 12:16:34 +0200 Subject: Ensure that the Grid custom variant is applied to the sort indicator Change-Id: I84dec79c43df05631957b7ab8acfda309268380e --- bundles/org.eclipse.rap.rwt/js/rwt/widgets/base/GridColumnLabel.js | 5 ++++- bundles/org.eclipse.rap.rwt/js/rwt/widgets/base/GridHeader.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/base/GridColumnLabel.js b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/base/GridColumnLabel.js index 2c52788811..dc1787cc23 100644 --- a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/base/GridColumnLabel.js +++ b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/base/GridColumnLabel.js @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2015 Innoopract Informationssysteme GmbH and others. + * Copyright (c) 2007, 2017 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 @@ -77,6 +77,9 @@ rwt.qx.Class.define( "rwt.widgets.base.GridColumnLabel", { var manager = rwt.theme.AppearanceManager.getInstance(); var states = {}; states[ value ] = true; + if( this._customVariant !== null ) { + states[ this._customVariant ] = true; + } var styleMap = manager.styleFrom( this.getAppearance() + "-sort-indicator", states ); var image = styleMap.backgroundImage; this.setCellContent( 2, image[ 0 ] ); diff --git a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/base/GridHeader.js b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/base/GridHeader.js index 13e1d47748..c86d8b2232 100644 --- a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/base/GridHeader.js +++ b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/base/GridHeader.js @@ -101,13 +101,13 @@ rwt.qx.Class.define( "rwt.widgets.base.GridHeader", { _renderLabel : function( label, column ) { this._renderLabelLeft( label, column ); + label.setCustomVariant( column.getCustomVariant() ); label.setVisibility( column.getVisibility() && column.getWidth() > 0 ); if( this._footer ) { this._renderFooterLabel( label, column ); } else { this._renderHeaderLabel( label, column ); } - label.setCustomVariant( column.getCustomVariant() ); label.setHorizontalChildrenAlign( this._getAlignment( column ) ); label.setWordWrap( column.getHeaderWordWrap() ); }, -- cgit v1.2.1