Skip to content

Commit

Permalink
account for grid view row renderer styling before Feathers UI 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtynjala committed Feb 22, 2024
1 parent 8660854 commit 2aa8b4c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/com/feathersui/themes/minimal/MinimalTheme.hx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ class MinimalTheme extends BaseMinimalTheme {
com.feathersui.themes.minimal.components.MinimalDatePickerStyles.initialize(this);
com.feathersui.themes.minimal.components.MinimalFormItemStyles.initialize(this);
com.feathersui.themes.minimal.components.MinimalGridViewStyles.initialize(this);
#if (feathersui >= "1.3.0")
com.feathersui.themes.minimal.components.MinimalGridViewRowRendererStyles.initialize(this);
#end
com.feathersui.themes.minimal.components.MinimalGroupListViewStyles.initialize(this);
com.feathersui.themes.minimal.components.MinimalHeaderStyles.initialize(this);
com.feathersui.themes.minimal.components.MinimalHierarchicalItemRendererStyles.initialize(this);
Expand Down Expand Up @@ -60,7 +62,9 @@ class MinimalTheme extends BaseMinimalTheme {
com.feathersui.themes.minimal.components.MinimalToggleSwitchStyles.initialize(this);
com.feathersui.themes.minimal.components.MinimalToolTipStyles.initialize(this);
com.feathersui.themes.minimal.components.MinimalTreeGridViewStyles.initialize(this);
#if (feathersui >= "1.3.0")
com.feathersui.themes.minimal.components.MinimalTreeGridViewRowRendererStyles.initialize(this);
#end
com.feathersui.themes.minimal.components.MinimalTreeViewStyles.initialize(this);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

package com.feathersui.themes.minimal.components;

#if (feathersui >= "1.3.0")
import com.feathersui.themes.minimal.skins.MinimalRectangleSkin;
import feathers.controls.ToggleButtonState;
import feathers.controls.dataRenderers.GridViewRowRenderer;
Expand Down Expand Up @@ -44,3 +45,4 @@ class MinimalGridViewRowRendererStyles {
}
}
}
#end
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class MinimalGridViewStyles {
}
});
}
#if (feathersui >= "1.3.0")
if (styleProvider.getStyleFunction(ItemRenderer, GridView.CHILD_VARIANT_CELL_RENDERER) == null) {
styleProvider.setStyleFunction(ItemRenderer, GridView.CHILD_VARIANT_CELL_RENDERER, function(itemRenderer:ItemRenderer):Void {
if (itemRenderer.backgroundSkin == null) {
Expand All @@ -123,6 +124,7 @@ class MinimalGridViewStyles {
styleProvider.getStyleFunction(ItemRenderer, null)(itemRenderer);
});
}
#end
if (styleProvider.getStyleFunction(Button, GridView.CHILD_VARIANT_HEADER_DIVIDER) == null) {
styleProvider.setStyleFunction(Button, GridView.CHILD_VARIANT_HEADER_DIVIDER, function(headerDivider:Button):Void {
var isDesktop = DeviceUtil.isDesktop();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

package com.feathersui.themes.minimal.components;

#if (feathersui >= "1.3.0")
import com.feathersui.themes.minimal.skins.MinimalRectangleSkin;
import feathers.controls.ToggleButtonState;
import feathers.controls.dataRenderers.TreeGridViewRowRenderer;
Expand Down Expand Up @@ -44,3 +45,4 @@ class MinimalTreeGridViewRowRendererStyles {
}
}
}
#end
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class MinimalTreeGridViewStyles {
}
});
}
#if (feathersui >= "1.3.0")
if (styleProvider.getStyleFunction(HierarchicalItemRenderer, TreeGridView.CHILD_VARIANT_CELL_RENDERER) == null) {
styleProvider.setStyleFunction(HierarchicalItemRenderer, TreeGridView.CHILD_VARIANT_CELL_RENDERER,
function(itemRenderer:HierarchicalItemRenderer):Void {
Expand All @@ -125,6 +126,7 @@ class MinimalTreeGridViewStyles {
styleProvider.getStyleFunction(HierarchicalItemRenderer, null)(itemRenderer);
});
}
#end
if (styleProvider.getStyleFunction(Button, TreeGridView.CHILD_VARIANT_HEADER_DIVIDER) == null) {
styleProvider.setStyleFunction(Button, TreeGridView.CHILD_VARIANT_HEADER_DIVIDER, function(headerDivider:Button):Void {
var isDesktop = DeviceUtil.isDesktop();
Expand Down

0 comments on commit 2aa8b4c

Please sign in to comment.