diff --git a/src/dlangui/graphics/resources.d b/src/dlangui/graphics/resources.d index a7a18310..04cafa8a 100644 --- a/src/dlangui/graphics/resources.d +++ b/src/dlangui/graphics/resources.d @@ -791,8 +791,15 @@ class ImageDrawable : Drawable { for (int xx = xx0; xx < rc.right; xx += imgdx) { Rect dst = Rect(xx, yy, xx + imgdx, yy + imgdy); Rect src = Rect(0, 0, imgdx, imgdy); - if (dst.intersects(rc)) - buf.drawFragment(dst.left, dst.top, _image.get, src); + if (dst.intersects(rc)) { + Rect sr = src; + if (dst.right > rc.right) + sr.right -= dst.right - rc.right; + if (dst.bottom > rc.bottom) + sr.bottom -= dst.bottom - rc.bottom; + if (!sr.empty) + buf.drawFragment(dst.left, dst.top, _image.get, sr); + } } } } else { diff --git a/src/dlangui/widgets/progressbar.d b/src/dlangui/widgets/progressbar.d index d0a9a0b4..d1b9ff29 100644 --- a/src/dlangui/widgets/progressbar.d +++ b/src/dlangui/widgets/progressbar.d @@ -186,7 +186,7 @@ class ProgressBarWidget : AbstractProgressBar { int w = animDrawable.width; _animationPhase %= w * 1000; animDrawable.drawTo(buf, rc, 0, cast(int)(_animationPhase * _animationSpeedPixelsPerSecond / 1000), 0); - Log.d("progress animation draw ", _animationPhase, " rc=", rc); + //Log.d("progress animation draw ", _animationPhase, " rc=", rc); } } } diff --git a/views/res/progress_bar_background_frame.9.png b/views/res/progress_bar_background_frame.9.png new file mode 100644 index 00000000..7c28adf8 Binary files /dev/null and b/views/res/progress_bar_background_frame.9.png differ diff --git a/views/res/theme_default.xml b/views/res/theme_default.xml index 2a2d7d0d..7385825e 100644 --- a/views/res/theme_default.xml +++ b/views/res/theme_default.xml @@ -507,13 +507,14 @@ diff --git a/views/standard_resources.list b/views/standard_resources.list index 9b3d4676..db71a0cc 100644 --- a/views/standard_resources.list +++ b/views/standard_resources.list @@ -56,6 +56,7 @@ res/group_box_frame_up_left_dark.9.png res/group_box_frame_up_right_dark.9.png res/slider_background_dark.9.png res/progress_bar_gauge_animation.png +res/progress_bar_background_frame.9.png res/i18n/std_en.ini res/i18n/std_ru.ini res/list_item_background.xml