From 63dbf76614161aca03e60e90ec0a3286b5687399 Mon Sep 17 00:00:00 2001 From: Ferran Sole Date: Tue, 29 Sep 2015 10:42:16 +0100 Subject: [PATCH] Bug fix: ItemView example's multiple selection checkbox renders below the image --- examples/item-view/item-view-example.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/item-view/item-view-example.cpp b/examples/item-view/item-view-example.cpp index 038d5e0..86f844d 100644 --- a/examples/item-view/item-view-example.cpp +++ b/examples/item-view/item-view-example.cpp @@ -26,6 +26,7 @@ #include #include #include +#include using namespace Dali; using namespace Dali::Toolkit; @@ -291,6 +292,9 @@ public: mReplaceButton.SetVisible( false ); stage.Add( mReplaceButton ); + // Store one 1x1 white image for multiple items to share for backgrounds: + mWhiteImage = BufferImage::WHITE(); + // Create the item view actor mImageAtlas = CreateImageAtlas(); mItemView = ItemView::New(*this); @@ -322,9 +326,6 @@ public: // Set the title and icon to the current layout SetLayoutTitle(); SetLayoutImage(); - - // Store one 1x1 white image for multiple items to share for backgrounds: - mWhiteImage = BufferImage::WHITE(); } Actor OnKeyboardPreFocusChange( Actor current, Actor proposed, Control::KeyboardFocus::Direction direction ) @@ -891,7 +892,8 @@ public: // From ItemFactory checkbox.SetSize( spiralItemSize.width * 0.2f, spiralItemSize.width * 0.2f ); checkbox.SetPosition( -SELECTION_BORDER_WIDTH, SELECTION_BORDER_WIDTH ); checkbox.SetZ( 1.0f ); - checkbox.SetSortModifier( -50.0f ); + SetCullFace(checkbox, Dali::CullBack); + checkbox.SetSortModifier( 150.0f ); if( MODE_REMOVE_MANY != mMode && MODE_INSERT_MANY != mMode && MODE_REPLACE_MANY != mMode ) @@ -907,8 +909,9 @@ public: // From ItemFactory tick.SetAnchorPoint( AnchorPoint::TOP_RIGHT ); tick.SetSize( spiralItemSize.width * 0.2f, spiralItemSize.width * 0.2f ); tick.SetZ( 1.0f ); - tick.SetSortModifier( -50.0f ); + tick.SetSortModifier( 150.0f ); tick.SetVisible( false ); + SetCullFace(tick, Dali::CullBack); checkbox.Add( tick ); // Connect new items for various editing modes -- libgit2 0.21.4