Customizable prints progress

Gehad Elrobey gehadelrobey at gmail.com
Sat Aug 8 18:10:26 PDT 2015


On Thu, Aug 6, 2015 at 11:51 AM, Lubomir I. Ivanov <neolit123 at gmail.com>
wrote:

> hello Gehad,
>
> On 6 August 2015 at 02:25, Gehad Elrobey <gehadelrobey at gmail.com> wrote:
> > Hello Lubomir,
> >
> > I wanted to update you with my progress till now, Last week I got stuck
> with
> > a bug that took long time to debug and fix (I didn't fix it completely
> but
> > hopefully will refactor my fixing code soon), here is what I completed
> till
> > now
> >
> > Template enhancement:
> > - Manage unused space in (One dive/ Two dives) Templates.
>
> some of the previous margin issues are still present.
>

The margins issue was due the rendering of the scroll bar which took
constant size at the right of the page, I fixed this by hiding the
scroll-bar.

> - Added new 6 dives per page template.
>
> nice, thank you!
>
> > - Remove warning label from dive profile.
>
> i haven't checked this in the application itself, but the code looks
> OK on a quick glance.
>
> >
> > Fix issues:
> > - Handle QColorDialog invalid colors.
> > - Fix incorrect state in templateEdit dialog.
> > - Remove unnecessary call to Qt5.5 function.
> > - Use colors defined in color palette.
> >
> > all commits are pushed to my branch.
> >
>
> here are some observations and comments. even if i'm not a great
> designer, i will try to provide you with some detailed feedback on
> each template. basically i suggest that we solve these before pushing
> to master and then we can start wrapping things up with community
> feedback and eventual fixes before the GSoC "pencils down" date.
>
> 1) all colors themes:
> i suggest we introduce another color so that we have "Table cells 1"
> and "Table cells 2". "Table cells 2" will be what color we have at the
> moment as "Background" and "Background" will be a default white
> (0xffffff) for all templates and themes. my reasoning behind this is
> that solid colors on the *whole* page don't make sense for everyone,
> so some might want to use white, while the second color for the table
> cells is nice to have.
>
> also please add a "Table border" color defaulting to black (0x000000)
> on all templates.
>
>
Done.


> 2) generic changes for *all* templates:
> - divide the current border width by two (if by two is too much try * 2/3)
>

Actually there is a problem with sizing the borders in QWebView, I
calculate the borders as follows:

border-width: max(1px, 0.1vw);

For some reasons the view width ratio "0.1vw" is not calculated, so the
value assigned is always 1px border which appears to be thick in low
resolution prints and small paper sizes, while it is so thin in high
resolution/ large paper sizes (eg. A0).

I don't know why "vw" sizing is not working as supposed with border-width
in QWebView though it works correctly for me in Chromium & Firefox.


> - remove the outer most border for all templates except "table". it
> acts like a separator between dives, but we didn't have it in the
> previous version
> - make the actual data font width regular (not bold) - e.g. Dive No
> (bold): 232 (not bold)
> if it looks too small, increase the default font height to 10
> (probably not needed).
>
>
Done.


> 2) flow layout:
> - there is still some empty space (margin) on the right.
>

Fixed.


> - the dive profile is missing - not sure how easy it is to add it?
>

AFAIK there is no straight forward way to implement this, as the flow
layout can break dives into pages and breaking the dive profile rendering
into pages is not easy, I will put this at my todo list, I can look into it
after the scoop of GSoC.


> - the end of last dive on the page is cut and the same applies to the
> start of the next dive on the new page. is that related to the page
> calculations or is it a CSS/HTML?
>
>
it was related to the incorrect page margins and fixed.


> 3) one dive:
> - there is still some empty space (margin) on the right.
> - it doesn't look like the "one dive per page" in the previous
> version, but apart from the generic changes we are going to leave it
> as is, until user feedback
>
> 4) six dives:
> - thanks for adding this one
> - there is still some empty space (margin) on the right.
>
> 5) table:
> - there are margins on the top, left, right which are undefined. the
> table should fit the page width and start from the top when no margins
> are set.
> - leave the outer border for this template, but reduce it's size as
> mentioned in "generic"
>

The borders issue is still existing, described above.


> - the "Table cells 1" color continues on the left and right of the
> table, should stop where the outer border ends
> - dives at the end of the pages are still cut, probably due to the
> unwanted margins on top
>
> 6) two dives:
> - there is still some empty space (margin) on the right.
>
>
I guess I fixed all the remaining issues, and pushed them to my branch,
please check them and update me if I got any of them incorrectly. I also
added a simple statistics view and some other bug fixes.

Now I will work mainly on fixing the page scrolling bug and the
documentation until you update me with further fixes/enhancements.

-- 
regards,

Gehad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150809/c50f6a1a/attachment.html>


More information about the subsurface mailing list