View Issue Details

IDProjectCategoryView StatusLast Update
0001342FreeCADFeaturepublic2014-01-06 17:12
Reporterquick61 Assigned To 
PrioritynoneSeveritytrivialReproducibilityhave not tried
Status closedResolutionno change required 
PlatformAllOSAllOS VersionAll
Summary0001342: Feature To Change Justify Setting In Main Window Style Sheets
DescriptionCurrently the style sheets in the main window are justified to the upper left corner of the main window. Could a setting be included in Edit > Preferences > General > General tab that would allow the style sheet to be justified to any of the other 3 corners and center? Maybe even scaled?

When using a tile, this is a non issue. When using an image, this is a different matter.

I put this here just in case someone might wish to pick it up.

If it's not possible to do, please close the request.
TagsNo tags attached.
FreeCAD Information

Activities

wmayer

2014-01-03 16:35

administrator   ~0004016

Sorry but I have no clue what you are talking about. Can you maybe add a picture to better illustrate you request, please?

quick61

2014-01-03 19:05

reporter  

FreeCAD_StyleSheet1.png (Attachment missing)

quick61

2014-01-03 19:24

reporter   ~0004019

Sorry for not being clear enough wmayer. Image attached. In that screenshot, the style sheet (picture) in the main window is "pinned" to the upper left corner. For this particular image. Having it "pinned" to the center of the main window would be preferable. Other images would benefit from having their pin placement (justification) in the lower right, so that when the combo view is moved right, the image would not slide with the move, as it dose now, and would move if the Python console / Report view was moved upwards to expand their view, as it does not do now.

As I have indicated, this is a trivial matter and one of ascetics. Not important at all. I just wanted to put this "out there" while it was fresh on my mind.

wmayer

2014-01-04 12:37

administrator   ~0004022

I guess you are talking about the background image with the maple leaf. The image is too big and you want to have an option to change the justification.

How is it possible to define such a background image in Qt? I have never seen this.

You talked about "style sheets" which is something similar to a theme. Is there an option in KDE where you can choose a style sheet that has such a background image?

quick61

2014-01-04 17:26

reporter   ~0004025

No, it's just what is defined in the style sheet, in ~/home/mark/.FreeCAD/Gui/Stylesheets/

QMdiArea[showImage="true"]
{
    background-image: url(/home/mark/Pictures/Wallpaper/haiku2k721600.jpg)
}

I have several like this with different images defined.

http://forum.freecadweb.org/viewtopic.php?f=8&t=4700&p=37159&hilit=style+sheets#p37149

Is there a way to define the justification from the style sheet? I have searched and can not find any information on how to do this. Having tried things like "background-position: bottom right;" in the style sheet results in a blank main window. It seems that either there is different syntax for QMdiArea to align the image, or that capability is somewhere above QMdiArea.

If this is something that can be handled through the style sheet, maybe we can close this ticket and move the topic over to the forum.

wmayer

2014-01-06 13:25

administrator   ~0004028

Have you read this? http://harmattan-dev.nokia.com/docs/library/html/qt4/stylesheet-customizing.html

Unfortunately, I cannot test this because my style sheet doesn't show the image at all. Have to check what's wrong here.

Anyway, this is nothing we can handle in the FreeCAD sources. If Qt doesn't do it as you need it we cannot fix it.

wmayer

2014-01-06 14:20

administrator   ~0004029

See also http://harmattan-dev.nokia.com/docs/library/html/qt4/stylesheet-reference.html#background-image-prop There it says if you have an SVG image it scales to the size of the widget.

To align your example you can e.g. write:
QMdiArea[showImage="true"]
{
    background-image: url(/home/mark/Pictures/Wallpaper/haiku2k721600.jpg);
    background-position: bottom right;
}

To scale the image to the available size you can also do (but looks not that nice):
QMdiArea[showImage="true"]
{
    border-image: url(/home/mark/Pictures/Wallpaper/haiku2k721600.jpg);
}

quick61

2014-01-06 16:01

reporter   ~0004030

Thank you wmayer, I've got it working. It seems that I was missing the ";" at the end of the background-image: ~ line. Both background-position and border-image are working just as they should.

Sorry for the trouble, I just could not find that information anywhere. That Nokia site never showed up anywhere in my searches.

I guess we can consider this matter closed. Problem solved.

Issue History

Date Modified Username Field Change
2014-01-02 21:17 quick61 New Issue
2014-01-03 16:35 wmayer Note Added: 0004016
2014-01-03 19:05 quick61 File Added: FreeCAD_StyleSheet1.png
2014-01-03 19:24 quick61 Note Added: 0004019
2014-01-04 12:37 wmayer Note Added: 0004022
2014-01-04 17:26 quick61 Note Added: 0004025
2014-01-06 13:25 wmayer Note Added: 0004028
2014-01-06 14:20 wmayer Note Added: 0004029
2014-01-06 16:01 quick61 Note Added: 0004030
2014-01-06 17:12 wmayer Status new => closed
2014-01-06 17:12 wmayer Resolution open => no change required