mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-11-29 18:59:14 +08:00
modify gradientdrawable,fix some uninitialized vars
This commit is contained in:
parent
924b1342fb
commit
8168d688da
@ -22,6 +22,7 @@ int main(int argc,const char*argv[]){
|
||||
pb->setSecondaryProgress(15);
|
||||
w->addView(pb).setPos(50,50);
|
||||
w->addView(pb2).setPos(50,100);
|
||||
|
||||
Runnable progress;
|
||||
progress=[w,pb,pb2,&progress](){
|
||||
pb->setSecondaryProgress((pb->getSecondaryProgress()+1)%100);
|
||||
@ -60,7 +61,6 @@ int main(int argc,const char*argv[]){
|
||||
//pb5->setProgressDrawable(new ColorDrawable(0xFF111111));
|
||||
w->addView(pb5).setId(105).setPos(50,150);
|
||||
//////////////////////////////////////////////////////////
|
||||
#if 1
|
||||
SeekBar*sb = new SeekBar(800,50);
|
||||
SeekBar*sb2= new SeekBar(800,50);
|
||||
|
||||
@ -77,6 +77,5 @@ int main(int argc,const char*argv[]){
|
||||
sb2->setMirrorForRtl(true);
|
||||
w->addView(sb).setId(200).setPos(50,300).setKeyboardNavigationCluster(true);
|
||||
w->addView(sb2).setId(201).setPos(50,380).setLayoutDirection(View::LAYOUT_DIRECTION_RTL);
|
||||
#endif
|
||||
return app.exec();
|
||||
}
|
||||
|
@ -220,22 +220,22 @@ void GradientDrawable::GradientState::setGradientRadius(float gradientRadius,int
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
GradientDrawable::GradientDrawable(){
|
||||
mGradientState=std::make_shared<GradientState>();
|
||||
mPadding.set(0,0,0,0);
|
||||
mAlpha = 255;
|
||||
GradientDrawable::GradientDrawable()
|
||||
:GradientDrawable(std::make_shared<GradientState>()){
|
||||
}
|
||||
|
||||
GradientDrawable::GradientDrawable(std::shared_ptr<GradientState>state){
|
||||
mPathIsDirty = mGradientIsDirty =false;
|
||||
mPadding.set(0,0,0,0);
|
||||
mGradientState=state;
|
||||
mMutated = false;
|
||||
mGradientRadius=0;
|
||||
mStrokeWidth =1.f;
|
||||
mAlpha = 255;
|
||||
}
|
||||
|
||||
GradientDrawable::GradientDrawable(Orientation orientation,const std::vector<int>&colors){
|
||||
mGradientState=std::make_shared<GradientState>(orientation,colors);
|
||||
mPadding.set(0,0,0,0);
|
||||
mAlpha = 255;
|
||||
GradientDrawable::GradientDrawable(Orientation orientation,const std::vector<int>&colors)
|
||||
:GradientDrawable(std::make_shared<GradientState>(orientation,colors)){
|
||||
}
|
||||
|
||||
std::shared_ptr<Drawable::ConstantState>GradientDrawable::getConstantState(){
|
||||
|
Loading…
Reference in New Issue
Block a user