Seems these codes fixed the problem.
QImageItem {
    id: comicPicture

    anchors.centerIn: parent

    width: actualSize ? comicPicture.nativeWidth : viewContainer.width
    height: actualSize ? comicPicture.nativeHeight : viewContainer.height

    smooth: true
    fillMode: QImageItem.PreserveAspectFit
    onImageChanged: {
        viewContainer.contentX = (root.isLeftToRight) ? 0 : (
viewContainer.contentWidth - viewContainer.width);
        viewContainer.contentY = (root.isTopToBottom) ? 0 : (
viewContainer.contentHeight - viewContainer.height);
    }
}

Thanks,
Reza

On Mon, Nov 5, 2012 at 9:02 PM, Reza Shah <rshah0...@kireihana.com> wrote:
> Hi Marco,
>
> I replaced as your suggestion, it worked, but has little problem with
> the scrollbar position as in this: http://paste.opensuse.org/4552016.
> Is this fixable from my codes?
>
> Regards,
> Reza
> On Sun, Nov 4, 2012 at 9:27 PM, Marco Martin <notm...@gmail.com> wrote:
>>
>> use viewContainer.contentWidth instead of
>> comicPicture.nativeWidth
>>
>>
>> cheers,
>> Marco Martin
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to