Vaadin Designer dont show the theme style - vaadin

I'm facing problems with the Vaadin Designer tool using with Vaadin v23, that is included in the pro description. A custom theme was created and i have annotated the theme in the application class of the project in order to append it. Inside the browser everything looks as expected with the styling of the theme. And every change on CSS have an effect on this outcome.
But the problem is, that the CSS of the theme has no effect on the designer view and i want to make this happen.
Logically that can't work with the theme in designer, because it is applied later to the Java-class (Application-class) through the #Theme-Annotation, but how can I properly apply the theme to the designer to have the full preview inside there?

Related

How to apply DEFAULT style for all the project

I work with VCL and FMX on this application, we are updating pack by pack of the software to FMX.
Something I did on the code, changed the STYLE of the application.
On the design view, it is the DEFAULT style, without any style edition.
However, when the application is compiled the STYLE for all FMX forms are changed, and the screen become a mess, the buttons disappears, etc...
I don't know what has been done to achieve it, but I could not find a manner to set all project to DEFAULT LAYOUT.
I tried to use
TStyleManager.SetStyleFromFile('light.style')
using the samples from delphi folder.
However, noon of the .STYLE are the DEFAULT.
Is there any DEFAULT.STYLE?
Or any manner to set DEFAULT.STYLE on RUNTIME?

Change component icons in Vaadin Flow

How can I replace the icons used in Vaadin Flow components (calendar, upload etc) with my own icons? Is that even possible? I didn't see anything in component's API and it looks like the icons are font icons instead of the usual iron-icon.
Yes, the component icons are implemented using font icons. The main reason was that they should be customizable with a theme (CSS), which seemed impossible using iron-icon. Eventually we want to transition to using SVGs for the component icons as well.
So, to customize the component icons, you need to write a component style sheet, where you change the icon. You can either create your own icon font, or use a CSS background image. The latter option has the downside of not being able to change color easily, without swapping the whole image.
As an example, here’s what you’d write for the vaadin-date-picker component (assuming that’s what you meant by “calendar”).
[part="toggle-button"]::before {
content: ""; /* Remove the existing font based icon */
background-image: url(...); /* data uri */
}
Use a base64 encoded data uri, so that you don’t have to worry about using relative or absolute paths for the image.
To use that style sheet in your Flow-based app, place CSS file in the frontend folder in your app, and add the following:
#CssImport(value = "my-styles.css", themeFor="vaadin-date-picker")

Can I add custom CSS that will not affect the style of generated PDFs?

The Orbeon doc here shows how to add custom CSS like so:
<property
as="xs:string"
name="oxf.fr.css.custom.uri.*.*"
value="/config/acme.css"/>
This CSS affects the display in Form Runner as well as generated PDF versions of the forms. Is there a way to add custom CSS that will not affect the PDF?
I ask because I am using custom CSS that hides all sections by default and custom JavaScript to simulate navigation between sections via show/hide. Since all sections are hidden by default, I end up with a PDF that is empty except for the title.
If there is no easy way to do this, I can work around it. I am running Form Runner within the Proxy Portlet in Liferay so I can add my custom CSS to the Liferay theme. But if there is a way to do this with Orbeon that would be nice.
Per suggestion by #avernet I was able to resolve this issue by enclosing my custom CSS in #media screen { ... }.

jquery ui icons

I am working with jquery ui and their icons.
My icons looks like this (except I have another theme): jquery ui icons chart
But I found this site with a set of nice icons which I would like to use (srcroll down to the bottom of the page): Michael Keck
Can these icons be found and downloaded somewhere? Do they belong to the jquery ui framework or are they customized and only exists on this site?
He's essentially created his own theme with that set of icons. That's the beauty of the jQuery UI CSS framework, it specifies a list of icons and you can choose to overwrite them without having to change any of your HTML markup or JS code.

Customizing the look and feel of Orbeon forms

We would like to be able to customize the areas outside the form elements area itself, such that customers can have all their forms including the areas surrounding the form in their own style. For instance in the area on the top we would like to have a different color and we would like to replace the Orbeon logo by the logo of the customer. Also we would like to hide/remove/customize some buttons that appear below the form. For instance we don't need the buttons for PDF, Email and Close and we want to change the text in the Save button to Submit.
Is that possible? If so, how do we do that? Is there some instruction somewhere for this?
Yes, you can do all of this through properties:
You can change the color at the top by overriding the .fr-top rule defined in form-runner-orbeon.css. For more on how to override CSS, see: Default CSS.
You can replace or remove the default logo with the oxf.fr.default-logo.uri.*.* property. See Default logo.
You can choose which buttons are shown on the Form Runner "details" page by overriding the oxf.fr.detail.buttons.*.* property. See Buttons on the detail page.
You can change the label on a button by overriding resources. See Overriding resources.
I was faced with the problem to change the icon in the browser address and found the answer of Alessandro Vernet:
http://discuss.orbeon.com/page-address-bar-browser-icon-td4660752.html .
But this solution has the drawback that I had to change the orbeon-form-runner.jar, and this with every new orbeon forms release, what I wanted to avoid.
So the idea was to give my icons the same name as the orbeon icons and to load them in a corresponding directory of the resource directory.
So I named my icon orbeon-icon-16.ico and orbeon-icon-16.png and loaded the two files in orbeon/WEB-INF/resources/ops/images.
For Firefox this was OK, but IE continued to show the orbeon icon. Then I noticed that in orbeon-core.jar there where also the 32 pixel icon.
So I added the two files orbeon-icon-32.ico and orbeon-icon-32.png and than also IE was showing our icon.

Resources