/*
* Copyright(c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System.ComponentModel;
using Tizen.NUI.BaseComponents;
namespace Tizen.NUI.Components
{
///
/// The default Popup style
///
[EditorBrowsable(EditorBrowsableState.Never)]
public class DefaultPopupStyle : StyleBase
{
///
/// Return default Popup style
///
internal protected override ViewStyle GetViewStyle()
{
PopupStyle style = new PopupStyle
{
Size = new Size(500, 280),
BackgroundColor = new Color(0.9f, 0.9f, 0.9f, 1),
ImageShadow = new ImageShadow
{
Url = DefaultStyle.GetResourcePath("nui_component_default_popup_shadow.png"),
Border = new Rectangle(24, 24, 24, 24),
Offset = new Vector2(-24, -24),
Extents = new Vector2(48, 48),
},
Title = new TextLabelStyle
{
PointSize = 16,
TextColor = Color.Black,
PositionUsesPivotPoint = true,
ParentOrigin = Tizen.NUI.ParentOrigin.TopLeft,
PivotPoint = Tizen.NUI.PivotPoint.TopLeft,
HorizontalAlignment = HorizontalAlignment.Begin,
VerticalAlignment = VerticalAlignment.Bottom,
Padding = 20,
Text = "Title",
},
Buttons = new ButtonStyle
{
Size = new Size(0, 80),
PositionUsesPivotPoint = true,
ParentOrigin = Tizen.NUI.ParentOrigin.BottomLeft,
PivotPoint = Tizen.NUI.PivotPoint.BottomLeft,
BackgroundColor = new Selector
{
Normal = new Color(1, 1, 1, 1),
Pressed = new Color(1, 1, 1, 0.5f),
},
Overlay = new ImageViewStyle
{
PositionUsesPivotPoint = true,
ParentOrigin = Tizen.NUI.ParentOrigin.Center,
PivotPoint = Tizen.NUI.PivotPoint.Center,
WidthResizePolicy = ResizePolicyType.FillToParent,
HeightResizePolicy = ResizePolicyType.FillToParent,
BackgroundColor = new Selector
{
Normal = new Color(1.0f, 1.0f, 1.0f, 1.0f),
Pressed = new Color(0.0f, 0.0f, 0.0f, 0.1f),
Selected = new Color(1.0f, 1.0f, 1.0f, 1.0f),
}
},
Text = new TextLabelStyle
{
PositionUsesPivotPoint = true,
ParentOrigin = Tizen.NUI.ParentOrigin.Center,
PivotPoint = Tizen.NUI.PivotPoint.Center,
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Center,
TextColor = new Color(0.05f, 0.63f, 0.9f, 1)
},
},
};
return style;
}
}
}