[SailfishDevel] Image scaling in Label with StyledText format

2016-07-05 Thread Oleg
Hello, developers.
I want to use Label with StyledText format. My text has images of different 
size via img html tag and this tag very often has width attribute. 
I modify text and set width to screen size. 
And the problems begin: if I use RichText format all are awesome and image has 
proper width and height  accordingly to this width.
But I need to use StyledText and when I set width - image doesn't scaled to 
this width. If I set height too - it scaled better but I can't calculate proper 
height of image and image takes mach space in Label. 
Can you help me how I can show scaled images in StyledText format as in 
RichText format? 

-- 
Отправлено с устройства Jolla
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] Image scaling in Label with StyledText format

2016-07-05 Thread Кожевников Андрей Андреевич

use RichText

05.07.2016 13:26, Oleg пишет:

Hello, developers.
I want to use Label with StyledText format. My text has images of different 
size via img html tag and this tag very often has width attribute.
I modify text and set width to screen size.
And the problems begin: if I use RichText format all are awesome and image has 
proper width and height  accordingly to this width.
But I need to use StyledText and when I set width - image doesn't scaled to 
this width. If I set height too - it scaled better but I can't calculate proper 
height of image and image takes mach space in Label.
Can you help me how I can show scaled images in StyledText format as in 
RichText format?



___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] Image scaling in Label with StyledText format

2016-07-05 Thread Oleg Linkin
There is a problem with RichText and sailfish style. Text which I use in
Label can use different colors which become unreadable on sailfish
background with RichText but stay readable with StyledText because of less
amount of available styled tags and attributes.
Or you think that I should ignore this problem?

2016-07-05 11:44 GMT+03:00 Кожевников Андрей Андреевич <
coderusin...@gmail.com>:

> use RichText
>
> 05.07.2016 13:26, Oleg пишет:
>
>> Hello, developers.
>> I want to use Label with StyledText format. My text has images of
>> different size via img html tag and this tag very often has width attribute.
>> I modify text and set width to screen size.
>> And the problems begin: if I use RichText format all are awesome and
>> image has proper width and height  accordingly to this width.
>> But I need to use StyledText and when I set width - image doesn't scaled
>> to this width. If I set height too - it scaled better but I can't calculate
>> proper height of image and image takes mach space in Label.
>> Can you help me how I can show scaled images in StyledText format as in
>> RichText format?
>>
>>
> ___
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to
> devel-unsubscr...@lists.sailfishos.org
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] Image scaling in Label with StyledText format

2016-07-05 Thread Martin Grimme
Hi,

you can add an inline style sheet that uses the current theme colors for rich 
text. I'm doing the same in my Tidings app for the Silica-styled view of the 
article pages. Then stuff like links look fine.


Cheers,
Martin

Am Di. Juli 5 11:01:47 2016 GMT+0200 schrieb Oleg Linkin:
> There is a problem with RichText and sailfish style. Text which I use in
> Label can use different colors which become unreadable on sailfish
> background with RichText but stay readable with StyledText because of less
> amount of available styled tags and attributes.
> Or you think that I should ignore this problem?
> 
> 2016-07-05 11:44 GMT+03:00 Кожевников Андрей Андреевич <
> coderusin...@gmail.com>:
> 
> > use RichText
> >
> > 05.07.2016 13:26, Oleg пишет:
> >
> >> Hello, developers.
> >> I want to use Label with StyledText format. My text has images of
> >> different size via img html tag and this tag very often has width 
> >> attribute.
> >> I modify text and set width to screen size.
> >> And the problems begin: if I use RichText format all are awesome and
> >> image has proper width and height  accordingly to this width.
> >> But I need to use StyledText and when I set width - image doesn't scaled
> >> to this width. If I set height too - it scaled better but I can't calculate
> >> proper height of image and image takes mach space in Label.
> >> Can you help me how I can show scaled images in StyledText format as in
> >> RichText format?
> >>
> >>
> > ___
> > SailfishOS.org Devel mailing list
> > To unsubscribe, please send a mail to
> > devel-unsubscr...@lists.sailfishos.org
>

-- 
Gesendet von meinem Jolla C
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org