CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/style-example-theme-three.json.in ${LOCAL_STYLE_DIR}/style-example-theme-three.json )
CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/tooltip-example-theme.json.in ${LOCAL_STYLE_DIR}/tooltip-example-theme.json )
CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/basic-light-theme.json.in ${LOCAL_STYLE_DIR}/basic-light-theme.json )
+CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/text-editor-example-theme.json.in ${LOCAL_STYLE_DIR}/text-editor-example-theme.json )
MESSAGE("Configured ${LOCAL_STYLE_DIR}/style-example-theme<>.json files")
FILE(GLOB LOCAL_STYLES_LIST "${LOCAL_STYLE_DIR}/*.json")
namespace
{
+const char * const THEME_PATH( DEMO_STYLE_DIR "text-editor-example-theme.json" ); ///< The theme used for this example
const Vector4 BACKGROUND_COLOR( 0.04f, 0.345f, 0.392f, 1.0f ); ///< The background color.
const char* TOOLBAR_IMAGE = DEMO_IMAGE_DIR "top-bar.png"; ///< The tool-bar image.
const float TOOLBAR_BUTTON_PERCENTAGE = 0.1f; ///< The button's space width as a percentage of the toolbar's width.
mEditor.InputStyleChangedSignal().Connect( this, &TextEditorExample::OnTextInputStyleChanged );
contents.Add( mEditor );
+ StyleManager styleManager = StyleManager::Get();
+ styleManager.ApplyTheme( THEME_PATH );
}
void CreateButtonContainer()
style-example-theme-one.json
tooltip-example-theme.json
basic-light-theme.json
+text-editor-example-theme.json
--- /dev/null
+/*
+ * Copyright (c) 2000-2017 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.
+ *
+ */
+
+{
+ "styles":
+ {
+ "ScrollBar":
+ {
+ "indicatorShowDuration":1.0,
+ "indicatorHideDuration":1.0,
+ "background": {
+ "rendererType": "image",
+ "url": "{APPLICATION_RESOURCE_PATH}/images/button-disabled.9.png"
+ }
+ },
+ "ScrollBarIndicator":
+ {
+ "resourceUrl":"{APPLICATION_RESOURCE_PATH}/images/button-white-up.9.png"
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2000-2017 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.
+ *
+ */
+
+{
+ "styles":
+ {
+ "ScrollBar":
+ {
+ "indicatorShowDuration":1.0,
+ "indicatorHideDuration":1.0,
+ "background": {
+ "rendererType": "image",
+ "url": "{APPLICATION_RESOURCE_PATH}/images/button-disabled.9.png"
+ }
+ },
+ "ScrollBarIndicator":
+ {
+ "resourceUrl":"{APPLICATION_RESOURCE_PATH}/images/button-white-up.9.png"
+ }
+ }
+}