<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 20, 2015 at 12:20 PM, Lubomir I. Ivanov <span dir="ltr"><<a href="mailto:neolit123@gmail.com" target="_blank">neolit123@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 20 July 2015 at 13:06, Gehad Elrobey <<a href="mailto:gehadelrobey@gmail.com">gehadelrobey@gmail.com</a>> wrote:<br>
><br>
><br>
> On Sun, Jul 19, 2015 at 9:56 PM, Lubomir I. Ivanov <<a href="mailto:neolit123@gmail.com">neolit123@gmail.com</a>><br>
> wrote:<br>
>><br>
>> On 19 July 2015 at 13:23, Gehad Elrobey <<a href="mailto:gehadelrobey@gmail.com">gehadelrobey@gmail.com</a>> wrote:<br>
>> ><br>
>> ><br>
>> > On Fri, Jul 17, 2015 at 9:28 PM, Lubomir I. Ivanov <<a href="mailto:neolit123@gmail.com">neolit123@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> On 17 July 2015 at 22:17, Lubomir I. Ivanov <<a href="mailto:neolit123@gmail.com">neolit123@gmail.com</a>><br>
>> >> wrote:<br>
>><br>
>> >> > On 17 July 2015 at 22:10, Gehad Elrobey <<a href="mailto:gehadelrobey@gmail.com">gehadelrobey@gmail.com</a>><br>
<div><div class="h5">>> >> > wrote:<br>
>> >> >><br>
>> >> >> Yes it does, you can test it on current master.<br>
>> >> >><br>
>> >> ><br>
>> >> ><br>
>> >> > this is technically a Qt bug of sorts, because the QPrintEngine<br>
>> >> > greyscale property for some *very odd* doesn't work in the preview<br>
>> >> > dialog.<br>
>> >><br>
>> >> (edit) "some *very odd* reason".<br>
>> >><br>
>> >> will need to go AFK in a bit; drop me a line when you need me to<br>
>> >> review again - e.g. tomorrow.<br>
>> ><br>
>> ><br>
>> > I have fixed the gray-scale issue as we discussed, Now we always use<br>
>> > QPrinter::setColorMode() during actual printing which produce nice<br>
>> > grayscale<br>
>> > prints, and use the css filter with the profile rasterization only<br>
>> > during<br>
>> > the previewing in the QPrintPreviewDialog with grayscale selected, I<br>
>> > pushed<br>
>> > the updates to my branch.<br>
>> ><br>
>><br>
>> just pulled the latest commits (at 185eff2a60).<br>
>><br>
>> the preview works as expected - rasterized when greyscale and vector<br>
>> when in color.<br>
>> but the actual print always ends in color for me (table and profile)!<br>
>><br>
>> looking at the code the branch here is entered correctly:<br>
>><br>
>> if (printOptions->color_selected && printerPtr->colorMode()) {<br>
>>     printerPtr->setColorMode(QPrinter::Color);<br>
>> } else {<br>
>>     printerPtr->setColorMode(QPrinter::GrayScale); // <-------------<br>
>> this is called when "print in color" is unchecked<br>
>> }<br>
>><br>
>> but setColorMode() simply doesn't work!<br>
>> are you sure this works for you?<br>
>> if it works for you but not for me, it could be Qt version specific in<br>
>> which case setColorMode() is *completely unreliable* and we need to<br>
>> use the raster/greyscale/css thing for the actual print as well.<br>
>><br>
><br>
> Yes, setColorMode works fine for me using Qt 5.5.0 on arch linux, I have<br>
> attached a colored and gray-scale printouts with the current settings.<br>
><br>
<br>
</div></div>ok, in that case won't use setColorMode() at all. just make it raster<br>
for greyscale - same as the preview method and vector for color mode.<br>
the whole greyscale thing has taken too much time already and is very<br>
questionable on application level as most modern drivers and spoolers<br>
should have a greyscale override anyway.<br><br></blockquote><div><br>Now we always rasterize for grayscale, I pushed the updates.</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">regards,</div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div dir="ltr"><div>Gehad</div></div></div></blockquote></div></div>
</div></div>