QFileIconProvider always use "gnome" theme? - linux

Is there a way to let user choose what icon theme to use , when using QFIleIconProvider ? It looks like Qt uses "gnome" by default , i wanted to change this behavior.

The icon style is dependent on what is returned from QApplication::style(). So if you change the application style using QApplication::setStyle(), you'll get a different set of icons too. If you want a different theme than the application style, you need to subclass QFileIconProvider and set you custom icon provider with QFileSystemModel::setIconProvider(yourCustomIconProvider).

Related

Set CullFace to Front and Back in Qt3D in Python via PySide2

I wanted to set QCullFace to FrontAndBack and that is why I wrote this:
from PySide2.Qt3DRender import Qt3DRender
cull_face = Qt3DRender.QCullFace()
cull_face.setMode(Qt3DRender.QCullFace.FrontAndBack)
render_pass = Qt3DRender.QRenderPass()
render_pass.addRenderState(cull_face)
The code above should set CullFace globally. But it does not. What did I do wrong?
I assume that the python binding does not change how Qt works in C++.
So you probably have a Qt3DWindow somewhere (unless you render to an offscreen or your own surface). If you want your cull face to be active, you have to retrieve the QRenderSettings from the window by calling renderSettings(). The render settings hold the active framegraph, i.e. if you want any render states or anything else that is related to the framegraph to be active, it has to be a child of the node that the render settings hold as active framegraph. You can get and set the active framegraph on the render settings by calling activeFramegraph() or setActiveFramegraph(QFramegraphNode*).
Is there a reason why you use QRenderPass? Because if yes, you have to create a QRenderPassFilter, in order to set it as the active framegraph on the render settings (QRenderPass does not inherit QFramegraphNode). This way you can filter out certain objects from the render pass.
But since you want the cull face to be active globally I'd suggest that you use a QRenderStateSet and add the QCullFace there. You can then set the render state set as the active framegraph on the render settings of the 3D window.

changing styleclass and disableoutputtag on panels within a facet using themes

I am not an expert on themes but i would like to know if it is possible to accomplish that:
Once i pull a panel into a facet i am hiding the panel by disabling the output tag and setting a special css class only for the designer client.
Has somebody tried to do that automatically in themes by checking if the panel is in a facet(Maybe ask for the key: property)?
I have tried to change the panel but i dont know how to set a certain style class based on a property of the panel.
To my best knowledge: A theme styles content rendered, not attributes that define if content gets rendered or not.
You have 2 options you could use:
create your own little extension library with controls you want to use everywhere. Add one 'containerPlaceholder' (or whatever you would call it) that doesn't render any own output, but only it's children.
use a snippet you simply paste into your source code.
don't use a panel or div, but add your custom controls to the callbacks. Makes your XPage more readable (that's what I do)
Hope that helps

Adding User Defined Runtime Attributes?

Is there a way to add user defined runtime attributes to a button in Xamarin's storyboard designer?
I'm trying to get Pixate Freestyle to work and need to define the attributes. I can only find the place to define them within xcode.
I was working on a Xamarin Forms project and I figured out that on each platform, there is a method to update the style for a Control. The way I used to do this is something like this:
PixateFreestyle.SetStyleId(view, styleId);
or
PixateFreestyle.SetClassId(view, classId);
Where view is any UIView you want to style ann styleId/classId is a string with the style name in your default.css
Hope this works for you
This is where I based my project
XamarinForms-PixateFreestyle

How can a graphic be placed in the OneUI .lotusBanner area using the Application Layout Control

I am using the Extension Libraries Application Layout Control and need to have a banner graphic placed in the .lotusBanner div on the right. How can this be done as it seems that the Application Layout Control can't be modified.
You could use the utilityLinksFacet on the extended control that Steve Pridemore did.
http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&documentId=CED2E61A75526CD086257997006DA95B
or you could use onload javascript to add it.
I was able to place a graphic in the upper right of the Application Layout Control in the Banner area by doing the following:
In the control under the Banner > Utility links I added a Basic node. For the node I specified the href and image. This worked and placed the image n the correct spot.
Artifacts of this were the location of the Banner Application links. To remedy this I used some CSS for the .lotusBanner ul.lotusLinks {margin-top: 45px;position:absolute;}
The margin-top was to push the links down so I could enlarge the logo that is used by the Application Layout Control.
The applicationLayout control in ExtLib is, as you have found out, locked down to only allow certain aspects of the configuration to be changed by the developer. You can add links to different sections of the applicationLayout but nothing beyond that.
One possible alternative is to NOT use the applictionLayout control itself but create your own approximation of it in a custom control, You would need to add all the necessary panels/divs with the special oneUI2 classes in all the correct places and then add editable areas and callbacks within these panels for the parts that you would want to customize throughout the application. All of the other sections in the applicationLayout control, like the bannerUtilityLinks are created using the ListofLinks control that is also found in the Extension Library.

How do I theme a MonoTouch application?

I'm doing an MonoTouch application and I would like to apply a theme. (So I don't have to have go around and apply a custom color and style to each view background and button.)
Is there any easy way to do this? So should I be setting the color manually, and use a helper class to determine which color?
e.g.
_myButton.Color = ThemeHelper.GetButtonColor();
You may want to take a look at UIAppearance in iOS 5+. It allows devs to set styles for UI elements globally as in the following example:
UIButton.Appearance.BackgroundColor = UIColor.Blue;
For more info, here's a good blog post: http://tirania.org/monomac/archive/2011/Oct-14.html

Resources