Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Graphic Ui
提交
23bd067e
G
Graphic Ui
项目概览
OpenHarmony
/
Graphic Ui
9 个月 前同步成功
通知
13
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Graphic Ui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
23bd067e
编写于
6月 15, 2021
作者:
O
openharmony_ci
提交者:
Gitee
6月 15, 2021
浏览文件
操作
浏览文件
下载
差异文件
!212 修复图形代码告警相关
Merge pull request !212 from guyuanzhang/clean2
上级
a9dedc0d
755f41b7
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
33 addition
and
23 deletion
+33
-23
frameworks/components/ui_toggle_button.cpp
frameworks/components/ui_toggle_button.cpp
+2
-2
interfaces/kits/components/abstract_adapter.h
interfaces/kits/components/abstract_adapter.h
+8
-2
test/uitest/test_texture_mapper/ui_test_texture_mapper.cpp
test/uitest/test_texture_mapper/ui_test_texture_mapper.cpp
+2
-2
test/uitest/test_texture_mapper/ui_test_texture_mapper.h
test/uitest/test_texture_mapper/ui_test_texture_mapper.h
+17
-13
test/uitest/test_ui_scroll_view/ui_test_ui_scroll_view.cpp
test/uitest/test_ui_scroll_view/ui_test_ui_scroll_view.cpp
+1
-1
test/unittest/animator/animator_unit_test.cpp
test/unittest/animator/animator_unit_test.cpp
+2
-2
test/unittest/components/ui_swipe_view_unit_test.cpp
test/unittest/components/ui_swipe_view_unit_test.cpp
+1
-1
未找到文件。
frameworks/components/ui_toggle_button.cpp
浏览文件 @
23bd067e
...
...
@@ -65,8 +65,8 @@ void UIToggleButton::CalculateSize()
rectWidth_
=
TOGGLE_BTN_WIDTH
*
minValue
/
DEFAULT_HOT_WIDTH
;
Rect
contentRect
=
GetContentRect
();
int16_t
dx
=
(
width_
-
rectWidth_
)
>>
1
;
int16_t
dy
=
(
height_
>>
1
)
-
corner_
;
int16_t
dx
=
(
width_
-
rectWidth_
)
/
2
;
// 2: half
int16_t
dy
=
(
height_
/
2
)
-
corner_
;
// 2: half
int16_t
x
=
contentRect
.
GetX
()
+
dx
;
int16_t
y
=
contentRect
.
GetY
()
+
dy
;
leftCenter_
=
{
static_cast
<
int16_t
>
(
x
+
corner_
),
static_cast
<
int16_t
>
(
y
+
corner_
)};
...
...
interfaces/kits/components/abstract_adapter.h
浏览文件 @
23bd067e
...
...
@@ -96,7 +96,10 @@ public:
virtual
int16_t
GetItemWidthWithMargin
(
int16_t
index
)
{
UIView
*
view
=
GetView
(
nullptr
,
index
);
UIView
*
view
=
GetView
(
nullptr
,
index
);
if
(
view
==
nullptr
)
{
return
0
;
}
int16_t
width
=
view
->
GetWidthWithMargin
();
DeleteView
(
view
);
return
width
;
...
...
@@ -104,7 +107,10 @@ public:
virtual
int16_t
GetItemHeightWithMargin
(
int16_t
index
)
{
UIView
*
view
=
GetView
(
nullptr
,
index
);
UIView
*
view
=
GetView
(
nullptr
,
index
);
if
(
view
==
nullptr
)
{
return
0
;
}
int16_t
height
=
view
->
GetHeightWithMargin
();
DeleteView
(
view
);
return
height
;
...
...
test/uitest/test_texture_mapper/ui_test_texture_mapper.cpp
浏览文件 @
23bd067e
...
...
@@ -79,12 +79,12 @@ void UITestTextureMapper::SetUp()
void
UITestTextureMapper
::
TearDown
()
{
delete
listener_
;
listener_
=
nullptr
;
DeleteChildren
(
container_
);
container_
=
nullptr
;
textureMapper_
=
nullptr
;
layout_
=
nullptr
;
delete
listener_
;
listener_
=
nullptr
;
}
const
UIView
*
UITestTextureMapper
::
GetTestView
()
...
...
test/uitest/test_texture_mapper/ui_test_texture_mapper.h
浏览文件 @
23bd067e
...
...
@@ -30,27 +30,31 @@ public:
{
if
(
viewGroup
!=
nullptr
)
{
viewGroup_
=
viewGroup
;
label_
=
new
UILabel
();
viewGroup_
->
Add
(
label_
);
label_
->
SetPosition
(
0
,
0
,
200
,
TITLE_LABEL_DEFAULT_HEIGHT
);
// 200: width;
label_
->
SetText
(
"OnAnimatorStop"
);
label_
->
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
FONT_DEFAULT_SIZE
);
label_
->
SetStyle
(
STYLE_TEXT_COLOR
,
Color
::
Black
().
full
);
label_
->
SetStyle
(
STYLE_BACKGROUND_COLOR
,
Color
::
White
().
full
);
label_
->
SetStyle
(
STYLE_BACKGROUND_OPA
,
OPA_OPAQUE
);
label_
->
SetVisible
(
false
);
viewGroup_
->
Add
(
&
label_
);
label_
.
SetPosition
(
0
,
0
,
200
,
TITLE_LABEL_DEFAULT_HEIGHT
);
// 200: width;
label_
.
SetText
(
"OnAnimatorStop"
);
label_
.
SetFont
(
DEFAULT_VECTOR_FONT_FILENAME
,
FONT_DEFAULT_SIZE
);
label_
.
SetStyle
(
STYLE_TEXT_COLOR
,
Color
::
Black
().
full
);
label_
.
SetStyle
(
STYLE_BACKGROUND_COLOR
,
Color
::
White
().
full
);
label_
.
SetStyle
(
STYLE_BACKGROUND_OPA
,
OPA_OPAQUE
);
label_
.
SetVisible
(
false
);
}
}
~
TestTextureMapperStopListener
()
{};
~
TestTextureMapperStopListener
()
{
if
(
viewGroup_
!=
nullptr
)
{
viewGroup_
->
Remove
(
&
label_
);
}
};
void
OnAnimatorStop
(
UIView
&
view
)
override
{
label_
->
SetVisible
(
true
);
label_
->
Invalidate
();
label_
.
SetVisible
(
true
);
label_
.
Invalidate
();
}
private:
UILabel
*
label_
=
nullptr
;
UILabel
label_
;
UIViewGroup
*
viewGroup_
=
nullptr
;
};
...
...
test/uitest/test_ui_scroll_view/ui_test_ui_scroll_view.cpp
浏览文件 @
23bd067e
...
...
@@ -119,7 +119,7 @@ void UITestUIScrollView::UIKit_UIScrollView_Test_bar_001()
scroll
->
SetPosition
(
positionX_
,
positionY_
,
g_scrollW
,
g_scrollH
);
VISIBLE_XBAR
(
false
);
scroll
->
SetYScrollBarVisible
(
true
);
scroll
->
SetReboundSize
(
50
);
// 50
: rebound size
scroll
->
SetReboundSize
(
50
);
// 50: rebound size
container_
->
Add
(
scroll
);
UILabelButton
*
button1
=
new
UILabelButton
();
button1
->
SetPosition
(
0
,
0
,
g_buttonW
,
g_buttonH
);
...
...
test/unittest/animator/animator_unit_test.cpp
浏览文件 @
23bd067e
...
...
@@ -52,13 +52,13 @@ public:
return
false
;
}
v
irtual
v
oid
Callback
(
UIView
*
view
)
override
void
Callback
(
UIView
*
view
)
override
{
int16_t
pos
=
EasingEquation
::
LinearEaseNone
(
START_POS
,
END_POS
,
animator_
->
GetRunTime
(),
animator_
->
GetTime
());
view_
->
SetX
(
pos
);
}
v
irtual
v
oid
OnStop
(
UIView
&
view
)
override
void
OnStop
(
UIView
&
view
)
override
{
view_
->
SetX
(
END_POS
);
}
...
...
test/unittest/components/ui_swipe_view_unit_test.cpp
浏览文件 @
23bd067e
...
...
@@ -220,7 +220,7 @@ class OnTestSwipeListener : public UISwipeView::OnSwipeListener {
public:
OnTestSwipeListener
()
{}
virtual
~
OnTestSwipeListener
()
{}
v
irtual
v
oid
OnSwipe
(
UISwipeView
&
view
)
override
void
OnSwipe
(
UISwipeView
&
view
)
override
{
view
.
SetWidth
(
DEFAULT_WIDTH
);
return
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录