Patiencer / thtmlviewer

Automatically exported from code.google.com/p/thtmlviewer
0 stars 0 forks source link

XE3 Styles makes HTMLViewer unsuable. #215

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Which steps will reproduce the problem?
1. Load a Demoproject (FrameDemW) into XE3.
2. Enable a style like Carbon and run the application.
3. Load any HTML file or the attached one. 

------
What is the expected output? What do you see instead?

Now it uses the VCL Styles to paint the content of the page and we get 
completly unreadable and wrong colored output in in the viewer. This is 
completly wrong to use the VCL Styles in the Viewer itself for rendering the 
HTML page!!! Style must only be used for painting the viewer control border and 
scrollbars (which doesn't work!), but nothing else. The rendering of the HTML 
SHOULD NEVER use the VCL Styles!!!!!!!! 

We are not able at all to set our custom default background and font color. So 
if I set the backgrount do White it will be blue instead and the fond color 
should be black, but it gets purple.

This is a very bad bug and makes the components not anymore useable in this 
state with activated VCL Styles.

------
Which version of the product are you using? Which compiler version are you
using? On which operating system?

- Delphi XE3. 
- Latest THTML components from svn.
- Windows 7 64 Bit.

Original issue reported on code.google.com by r...@eicom.ch on 12 Nov 2012 at 12:58

Attachments:

GoogleCodeExporter commented 9 years ago
Could you check the code at 
https://github.com/JPeterMugaas/HtmlViewer/tree/HtmlViewer11 to see if that 
helps with the problem.  I have to admit theme support can be tricky.  Making 
it worse is that when printing, the background is usually white no matter what 
the color settings are.  About the only ultimate fix would be to support 
printer style sheets.  I have to do some research about drawing some things 
with themes.

Please get back to me about this.  Thanks.

Original comment by jpmug...@suddenlink.net on 16 Nov 2012 at 9:15

GoogleCodeExporter commented 9 years ago
I have tried it but I can't see any differences. The rendering is still wrong 
and my html files look near unredable as of the styles colors. I still say, 
that Delphi Styles have nothing to do with the HMTL styles and should NEVER be 
used at all for rendering the HTML file. For the visual of the HTML files we 
have CSS and mixing this with something not HTML related is not the right way 
to do this. 

In Additon: What still is wrong, is that the component doesn't use the Delphi 
styles for what it is designed. As such the controls frame and Scrollbars are 
still not correctly styled. This are the parts of the component which should be 
made style ready, but under no circumstance the rendering of the HTML itself, 
as we have CSS for this.

PS. Please use my attached file and use Carbon as the Delphi style to see it 
live. It looks ugly and unreadable and not the way the html file was designed. 
Also try to do this in the FramDemW demo applicaiton: Open Options->Default 
Font/Color and tr to set the color below to somethink like background "white" 
in the compbobox. You will not get a whit background by this. 

Original comment by r...@eicom.ch on 16 Nov 2012 at 1:45

GoogleCodeExporter commented 9 years ago
Something different about your github download link: Whenever I download the 
files from your link above, all the files are in UNIX format with only LF as 
line breaks. Delphi has problems with this and I wonder how I can download this 
files in Windows style with CR/LF linebreaks? Is there a way to do this?

Original comment by r...@eicom.ch on 16 Nov 2012 at 1:59

GoogleCodeExporter commented 9 years ago
I'll have to see what I can do about the LF stuff.  As far as the main issue 
you describe, I need to clarify.  Are you talking about the print preview 
controls not rendering properly.  If that's the case, I need to some research 
on styles and drawing.  The scrollbars are not drawing properly with styles.  
In addition, I'm going to have to see what needs to be done with the Print 
Preview Dialog box and frame.

As far as the colors, the way I saw things is that relative colors should be 
using VCL Themes.  If you disagree, you should set the StyleElements set 
appropriately since that should be supported in XE3.  

Original comment by jpmug...@suddenlink.net on 16 Nov 2012 at 9:48

GoogleCodeExporter commented 9 years ago
I'm talking about the normal html rendering in TFrameViewer/THTMLViewer. I did 
nowhere say anything about printing. Please do the following do see what I'm 
talking about. It looks as you just ingnoring my description to see it!

!!!!!!!!!!!!!!!!!!!!
PLEASE compile the DFramDemW Demoporject and set it to style "Carbon". On 
Runtime load my attached HTML file. I t will near be unreadable, as of the 
wrong colors. Also set the default font/background colors in the demo 
applicaiton on runtime under "Options->Default Fonts/Colors" to "white". This 
will give completly wrong colors. So it would not be white at all, but blue.

I can still not understand why you try to adopt the Delphi styles to a HTML 
rendering which uses its owns style with CSS already. I can't see any sense in 
this. The control itself should adabting the styles for the control border and 
the scroollbars and nothing else. That's all.

Original comment by r...@eicom.ch on 19 Nov 2012 at 5:45