Switching between highlightjs styles - angular7

In my component I let the user switch between color themes (dark/light).
Based on what the user selects I want to be able to switch between highlightjs styles (vs.css / atom-one-dark.css')
Is there a way to do it without having to modify the library's styles?

I ended up creating my own custom css file combining everything I needed.

Related

Vaadin Designer dont show the theme style

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?

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")

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.

Applying custom color to jquery ui-icons

I am new to jQuery. I want to use the "ui-icon ui-icon-triangle-1-e" with a color that matches my application ,also I dont want use a differnt .png file with the color I want. Please help me get this done.
Your best option is to use a different PNG file, that's the only option for this really (that works cross-browser). However it's pretty easy to get the color you want, use the jQuery UI ThemeRoller and you can configure/download the exact colors you want in a theme, including the icons.

How can I put an eclipse editor inside another eclipse editor?

I am trying to develop an eclipse plug-in that has an editor. The editor needs to show two instances of another editor (showing two different documents), and a toolbar. The internal editors are coming from another plugin. The toolbar needs to control the two internal editors (e.g., when clicking a button, change the background color of some items in one of the internal editors, assuming the internal editor has the API to change background color of course).
Can this be done? Any hints on how to start?
Many thanks for your advice.
You can try and see if a MultiPageEditorPart could be helpful in your case.
/**
* A multi-page editor is an editor with multiple pages, each of which may
* contain an editor or an arbitrary SWT control.
*/
I would have the logic of the editors as SWT Composites. Then the Editor is just a wrapper on top of the composites.
This way, you can create a new editor that combines functionality of other editors by combining the composites in different ways.
Extending VonC's answer, then you can have the composites as tabs in the MultiPageEditor, or just combine them anyway you want

Resources