You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2018/05/28 10:06:52 UTC
[1/2] incubator-weex git commit: [WEEX-386][Core] Fix apply default
style
Repository: incubator-weex
Updated Branches:
refs/heads/master b25cfd4cc -> 0d960067e
[WEEX-386][Core] Fix apply default style
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/ba2a59a2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/ba2a59a2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/ba2a59a2
Branch: refs/heads/master
Commit: ba2a59a26c6176afdff17d75eaebc9517f5e22f2
Parents: b25cfd4
Author: miomin <mi...@foxmail.com>
Authored: Mon May 28 17:48:44 2018 +0800
Committer: miomin <mi...@foxmail.com>
Committed: Mon May 28 17:52:51 2018 +0800
----------------------------------------------------------------------
weex_core/Source/core/render/node/render_appbar.h | 9 +++++++--
weex_core/Source/core/render/node/render_object.h | 12 ++++++++++++
2 files changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ba2a59a2/weex_core/Source/core/render/node/render_appbar.h
----------------------------------------------------------------------
diff --git a/weex_core/Source/core/render/node/render_appbar.h b/weex_core/Source/core/render/node/render_appbar.h
index 27774fb..9795de6 100644
--- a/weex_core/Source/core/render/node/render_appbar.h
+++ b/weex_core/Source/core/render/node/render_appbar.h
@@ -43,13 +43,18 @@ namespace WeexCore {
style->insert(std::pair<std::string, std::string>(PADDING_LEFT, "0"));
style->insert(std::pair<std::string, std::string>(PADDING_RIGHT, "0"));
- if (!appbar_color.empty() && appbar_color != "")
+ if (!appbar_color.empty() && appbar_color != "" && !StyleExist(appbar_color))
style->insert(std::pair<std::string, std::string>(COLOR, appbar_color));
- if (!appbar_background_color.empty() && appbar_background_color != "")
+ if (!appbar_background_color.empty() && appbar_background_color != "" && !StyleExist(appbar_background_color))
style->insert(std::pair<std::string, std::string>(BACKGROUND_COLOR, appbar_background_color));
return style;
}
+ inline bool StyleExist(const std::string &key) {
+ std::string value = GetStyle(key);
+ return !value.empty() && value != "";
+ }
+
public:
StyleType ApplyStyle(const std::string &key, const std::string &value, const bool updating) {
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ba2a59a2/weex_core/Source/core/render/node/render_object.h
----------------------------------------------------------------------
diff --git a/weex_core/Source/core/render/node/render_object.h b/weex_core/Source/core/render/node/render_object.h
index c92f4e9..195c798 100644
--- a/weex_core/Source/core/render/node/render_object.h
+++ b/weex_core/Source/core/render/node/render_object.h
@@ -432,6 +432,18 @@ namespace WeexCore {
}
}
+ inline const std::string GetStyle(const std::string &key) {
+ if (mStyles == nullptr)
+ return "";
+
+ std::map<std::string, std::string>::iterator iter = mStyles->find(key);
+ if (iter != mStyles->end()) {
+ return iter->second;
+ } else {
+ return "";
+ }
+ }
+
inline void MarkRootRender() {
mIsRootRender = true;
}
[2/2] incubator-weex git commit: [WEEX-386][Core] Update
libweexcore.so
Posted by ky...@apache.org.
[WEEX-386][Core] Update libweexcore.so
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/0d960067
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/0d960067
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/0d960067
Branch: refs/heads/master
Commit: 0d960067e1864c981460dfcc40c9f7651840a4ca
Parents: ba2a59a
Author: miomin <mi...@foxmail.com>
Authored: Mon May 28 17:55:34 2018 +0800
Committer: miomin <mi...@foxmail.com>
Committed: Mon May 28 17:55:34 2018 +0800
----------------------------------------------------------------------
android/sdk/libs/armeabi/libweexcore.so | Bin 644980 -> 644980 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/0d960067/android/sdk/libs/armeabi/libweexcore.so
----------------------------------------------------------------------
diff --git a/android/sdk/libs/armeabi/libweexcore.so b/android/sdk/libs/armeabi/libweexcore.so
index cb2c4b0..2de9e8b 100644
Binary files a/android/sdk/libs/armeabi/libweexcore.so and b/android/sdk/libs/armeabi/libweexcore.so differ