diff --git a/README.md b/README.md index d8f63d26..1cd13adb 100755 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ # **Building CDROID:** * 1.install dependencs: sudo apt install build-essential cmake gdb pkg-config zip gettext libx11-dev * 2.install vcpkg -* 3.install cdroid deplibs: vcpkg install libzip cairo +* 3.install cdroid deplibs: vcpkg install gtest jsoncpp libunibreak libjpeg-turbo[jpeg8] libzip cairo * 4.create buildings:./build.sh --port=x64 * 5.enter buildout directory and make the cdroid project diff --git a/apps/w9/R.h b/apps/w9/R.h index d4474f55..d075810d 100644 --- a/apps/w9/R.h +++ b/apps/w9/R.h @@ -1,6 +1,6 @@ #pragma once -/*Generated by machine ,Do not edit!!!*/ +/*Generated by machine ,Do not edit !!!*/ namespace w9{ diff --git a/src/gui/view/view.cc b/src/gui/view/view.cc index c5eaeee8..c89e3a40 100755 --- a/src/gui/view/view.cc +++ b/src/gui/view/view.cc @@ -2264,31 +2264,33 @@ void View::onDrawScrollBars(Canvas& canvas){ #endif // Do not draw horizontal scroll bars for round wearable devices. } else if ( drawVerticalScrollBar || drawHorizontalScrollBar) { - Rect& bounds = mScrollCache->mScrollBarBounds; ScrollBarDrawable* scrollBar = mScrollCache->scrollBar; if (drawHorizontalScrollBar) { scrollBar->setParameters(computeHorizontalScrollRange(), computeHorizontalScrollOffset(),computeHorizontalScrollExtent(), false); + Rect& bounds = mScrollCache->mScrollBarBounds; getHorizontalScrollBarBounds(&bounds, nullptr); - onDrawHorizontalScrollBar(canvas,scrollBar, bounds.left, bounds.top,bounds.width, bounds.height); + onDrawHorizontalScrollBar(canvas,scrollBar, bounds); + if (bInvalidate) invalidate(bounds); } if (drawVerticalScrollBar) { scrollBar->setParameters(computeVerticalScrollRange(), computeVerticalScrollOffset(),computeVerticalScrollExtent(), true); + Rect& bounds = mScrollCache->mScrollBarBounds; getVerticalScrollBarBounds(&bounds, nullptr); - onDrawVerticalScrollBar(canvas, scrollBar, bounds.left, bounds.top,bounds.width, bounds.height); + onDrawVerticalScrollBar(canvas, scrollBar, bounds); + if (bInvalidate) invalidate(bounds); } - if (bInvalidate) invalidate(mScrollCache->mScrollBarBounds); } } -void View::onDrawHorizontalScrollBar(Canvas& canvas, Drawable* scrollBar,int l, int t, int w, int h){ - scrollBar->setBounds(l, t, w, h); - scrollBar->draw(canvas); +void View::onDrawHorizontalScrollBar(Canvas& canvas, Drawable* scrollBar,const Rect&rect){ + scrollBar->setBounds(rect); + scrollBar->draw(canvas);LOGD("onDrawHorizontalScrollBar(%d,%d,%d,%d)",rect.left,rect.top,rect.width,rect.height); } -void View::onDrawVerticalScrollBar (Canvas& canvas , Drawable* scrollBar,int l, int t, int w, int h){ - scrollBar->setBounds(l, t, w, h); +void View::onDrawVerticalScrollBar (Canvas& canvas , Drawable* scrollBar,const Rect&rect){ + scrollBar->setBounds(rect); scrollBar->draw(canvas); } @@ -5879,8 +5881,8 @@ bool View::handleScrollBarDragging(MotionEvent& event) { } if (mScrollCache->mScrollBarDraggingState == ScrollabilityCache::DRAGGING_HORIZONTAL_SCROLL_BAR) { - Rect bounds = mScrollCache->mScrollBarBounds; - getHorizontalScrollBarBounds(&bounds, nullptr); + Rect& bounds = mScrollCache->mScrollBarBounds; + getHorizontalScrollBarBounds(&bounds, nullptr); int range = computeHorizontalScrollRange(); int offset = computeHorizontalScrollOffset(); int extent = computeHorizontalScrollExtent(); diff --git a/src/gui/view/view.h b/src/gui/view/view.h index 7ebe7816..31d8cec7 100755 --- a/src/gui/view/view.h +++ b/src/gui/view/view.h @@ -614,8 +614,8 @@ protected: virtual void getScrollIndicatorBounds(Rect&); virtual void onDrawScrollIndicators(Canvas& canvas); virtual void onDrawScrollBars(Canvas& canvas); - void onDrawHorizontalScrollBar(Canvas& canvas, Drawable* scrollBar,int l, int t, int w, int h); - void onDrawVerticalScrollBar (Canvas& canvas , Drawable* scrollBar,int l, int t, int w, int h); + void onDrawHorizontalScrollBar(Canvas& canvas, Drawable* scrollBar,const Rect&); + void onDrawVerticalScrollBar (Canvas& canvas , Drawable* scrollBar,const Rect&); void ensureTransformationInfo(); public: