[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: set flickable content position
From:       Reza Shah <rshah0385 () kireihana ! com>
Date:       2012-11-05 12:57:12
Message-ID: CAPQiRUcsKgXGeeQnQwenN70526z9MkiX7fEvN9mv3tP2wEmGhA () mail ! gmail ! com
[Download RAW message or body]

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 <rshah0385@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 <notmart@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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic