Commit Graph

19 Commits

Author SHA1 Message Date
Sebastiano Poggi
c21185c281 Fix default button focus outline & chip colors (#420)
* The default button was missing spacing between its bg and the focus
  outline. Outlined buttons are unaffected.
* The chips were drawing a double-outline when focused and selected. Now
  they only draw the selected outline if they are both focused and
  selected.
* The chips didn't clearly signal the pressed and selected states. The
  background now reflects these states better (standalone only).
  There are no specs so we're going with a bit more freedom in the
  standalone version, as the Swing impl is quite lacking in polish still
GitOrigin-RevId: f57eba2a16493454cfd978f0a6dedc73e30848bb
2024-07-01 14:54:53 +02:00
Sebastiano Poggi
7b443ac9b1 Add editor & console text styles, use them in Markdown (#393)
The IDE also has an editor and a console text style, which come from the
editor color scheme. We weren't using them until now, but we now fully
comply to it in the Markdown rendering, too.
GitOrigin-RevId: 6732d567e0a22155ac6b3b0a05c8ab5e371296a3
2024-06-05 08:35:55 +00:00
Sebastiano Poggi
5039d186ad Improve Markdown styling (#392)
* Fix wrong block content colour on bridge MD style

* Allow specifying default text style in standalone

* Update API dumps
GitOrigin-RevId: e0bfcce3cb378713801fc851e4b01e4d52ed999e
2024-06-04 21:51:03 +02:00
Sebastiano Poggi
65e8b934be Add text colours to GlobalColors (#381)
It's practical to have the "base" text colours in GlobalColors:

 * Normal
 * Selected
 * Disabled
 * Info
 * Error

They apply to labels and most components, but not every component
(e.g., default buttons have "inverted" text colors).

Note that the text colour is used as content colour, but not directly
in the styling. Besides, when initialising the stylings, we can't
really read these values as they haven't been init yet.

This is mostly a convenience for users that want to set a content colour
(e.g., to visually show some text as disabled/error).

Note: GlobalColors.paneBackground was renamed to panelBackground for
consistency with the Swing color key naming.
GitOrigin-RevId: 76d7dc9a3d33d4b82c9a5d2605ca6174efa55751
2024-05-09 12:24:58 +00:00
Sebastiano Poggi
2c738a1199 Fix menu dividers in bridge (#361)
The main root cause was a missing return statement in retrieveIntAsDp(),
but we also had terribly inconsistent values for the menus compared to
the actual appearance. I have tweaked the bridge menu style defaults to
align better, but we'll have to come back to revisit the whole menu
implementation to actually use the right values in the right way. The
current implementation is not satisfactory.
GitOrigin-RevId: 5ffff1124420179750630370aaa33888f88506f2
2024-04-22 09:22:32 +01:00
Sebastiano Poggi
c96ce4ebb4 Address static analysis errors
GitOrigin-RevId: 1cf09788567c3de77932f5a292c31a6bb319cb7c
2024-03-19 16:18:26 +01:00
Sebastiano Poggi
64f7b09ead 🔀 Rename textStyle -> defaultTextStyle (#309)
* Update standalone bundled Inter font to 4.0

* Rename textStyle -> defaultTextStyle

This makes the extension function on JewelTheme clearer in its intent of
accessing the default TextStyle from the composition locals.

The former defaultTextStyle has been transformed to a function, which is
also making clearer it's a creation and not a field access. It has
contextually been renamed to createDefaultTextStyle().
GitOrigin-RevId: a893d03baad34a2912b632aedad16c257019581e
2024-02-21 12:42:00 +08:00
Sebastiano Poggi
372242e6b5 #291 — Fix icons patching and theming issues in 241 (#293)
Fix icon loading and errors in bridge for 241
GitOrigin-RevId: 4df0132cdadf2d8297fd0fa57573f5630c481ddf
2024-02-08 11:42:36 +01:00
Fabrizio Scarponi
d11c7dbec3 Extend TabStrip API to support custom behaviours (#276)
* Update TabData for flexible content

* Update ui/src/main/kotlin/org/jetbrains/jewel/ui/component/TabStrip.kt

Co-authored-by: Sebastiano Poggi <rock3r@users.noreply.github.com>

* Update ui/src/main/kotlin/org/jetbrains/jewel/ui/component/TabStrip.kt

Co-authored-by: Sebastiano Poggi <rock3r@users.noreply.github.com>

* review

* review

* Add tab content spacing to the user interface

The user interface has been updated to include tab content spacing. This is established by adding a new parameter, `tabContentSpacing`, in TabMetrics and adjusting and testing its implementation across various files like `IntUiTabStyling.kt`, `IntUiBridge.kt`, and `Tabs.kt`. This modification will ensure more consistency and control over the user interface design. The user interface api file has also been updated to reflect this change.

* lint

* api fix

* Update int-ui-standalone APIs
GitOrigin-RevId: 7e61aafa34113649798ccad1e3d3fc6208390a01
2023-12-28 11:03:58 +01:00
Fabrizio Scarponi
05c9d007b6 Dropdown support for leading icons (#269)
* Update dropdown item with icons and keybindings

* Fix minor issues (typos, formatting)

* Make the CI pass

The API check works locally, but not on the CI. Not sure why.

* api dump

* Run apiDump on Linux, because.

---------

Co-authored-by: Sebastiano Poggi <sebp@google.com>
Co-authored-by: Sebastiano Poggi <poggos@gmail.com>
GitOrigin-RevId: 0db2d4b906939f8b0a21e71e758509525bba7c12
2023-12-14 22:59:43 +01:00
Sebastiano Poggi
fb31ac7ec1 Create Slider component (#270)
Introduce Slider component following general IntUI style
GitOrigin-RevId: 58b0402c3576be8fd2fe756626f661dde569c2b8
2023-12-12 09:26:33 +01:00
Sebastiano Poggi
937f0b7393 Remove LabelledTextField and its styling (#230)
GitOrigin-RevId: 0712a4963a2aa3d2f5b4f5a89e23243d995b76f4
2023-11-01 09:55:15 +08:00
Kanro
64120a635f 🔀 Stroke hint, ExtensionComponentStyling api and Unfocusable IconButton/Tab (#213)
* Make icon button and tabs unfocusable

* Stroke hint with svg patcher

* Stroke hint with svg patcher

* Fix light header switching

* Update api

* DynamicComponentStyling support

* Rename to LazyComponentStyling

* Make ComponentStyling.defaultComponentStyle as a LazyComponentStyling

* Simplify function name

* Update api

* Make ktlint happy

* Update api

* Update api

* Activation, SelectableIconButton support and new standalone sample

* Fix comment

* Make linters happy

* Fix comments

* Update API

* Make ktlint happy

* Fix comments

* Fix comments, outline button dark disabled style

* Update api

* Make ktlint happy
GitOrigin-RevId: 6dfacea4195d9bcd275797e1d3fd1b2464d7ed7c
2023-10-31 17:36:15 +00:00
Kanro
17ce9ecd13 Refactor component styling API for extension components (#210)
* Refactor component styling API for extension components

* Make detekt happy

* Make detekt happy
GitOrigin-RevId: 21d3aa4ae014b429449ba0c491b5521a5236d876
2023-10-28 14:24:04 +08:00
Sebastiano Poggi
9fc924b3ce Update docs, cleanup code after refactor (#199)
* Clean up code, add simple IntUiTheme entry point

Moved foundation.tree into foundation.lazy, too.

* Update README for 0.8.0

Added code samples, updated project structure, added sections on custom
window decoration and icon runtime patching.

* Add getting started section
GitOrigin-RevId: 7e69d32bda849d252fcf4a013fe8ebebb6ca1777
2023-10-22 22:00:08 +08:00
Sebastiano Poggi
02f56077d6 The big refactor — part 4: Marie Kondo edition (#198)
* Move core components to core.component package

Includes moving their styling to a subpackage

* Move state to core.state package

* Move other bits to core and foundation packages

* Move basic theme stuff to foundation package

The foundation package doesn't depend on core anymore!

* Rename core package to ui

* Remove int-ui-core module

Its few files have been moved to ui and intui-standalone

* Rename core module to ui

* Split foundation module out of ui module

* Add missing foundation.api file

* Remove unnecessary FQNs
GitOrigin-RevId: 7cc69fd7345c6ead217f79d658b50944d5e90581
2023-10-22 12:12:43 +08:00
Sebastiano Poggi
a4c7b82315 The big refactor — part 3: more interfaces (#195)
* Collapse Global* interfaces

* Collapse IconData interface, update generator

* Collapse ThemeColorPalette interface, update generator

* Collapse ThemeDefinition interface, update generator

* Renamed theme to JewelTheme

Cannot collapse the theme into JewelTheme since we get some
nasty classloading issue with Composer. Will investigate
separately.

* Cleanup some more code

* Rename ComponentStyling

* Rename ContextMenuRepresentation

* Clean up decorated window code, too

* Final cleanup pass

* Get rid of BaseIntUiTheme and IntUiTheme

One theme to rule them all!
GitOrigin-RevId: f9f9c42d11c682220b7c3bf4b3652e72d2e01db4
2023-10-21 14:03:39 +08:00
Sebastiano Poggi
75a0399c28 The big refactor — part 2 (#193)
* ButtonStyle refactor

* CheckboxStyle refactor

* ChipStyle refactor

* CircularProgressStyle refactor

* DividerStyle refactor

* DropdownStyle refactor

* GroupHeaderStyle refactor, simplify other styling

* HorizontalProgressBarStyle refactor

* IconButtonStyle refactor

* LazyTreeStyle refactor

* LinkStyle refactor

* MenuStyle refactor

* RadioButtonStyle refactor

* ScrollbarStyle refactor

* Fix IntUiButtonStyling

* TabStyle refactor

* InputFieldStyle & co refactor

* TooltipStyle refactor

* Update API dump

* Fix dropdown menu and fallback rule (#194)

* Fix dropdown menu and fallback rule

* Fix tooltip

* Fix tooltip

* 🔀 Apply suggestions from code review

Co-authored-by: Sebastiano Poggi <rock3r@users.noreply.github.com>

* 🔀 Apply suggestions from code review

---------

Co-authored-by: Sebastiano Poggi <rock3r@users.noreply.github.com>

* Fix issues

---------

Co-authored-by: Kanro <higan@live.cn>
GitOrigin-RevId: f0fbce89d0600c80d47dc5939a8e4f2a89619800
2023-10-20 19:10:11 +00:00
Sebastiano Poggi
2a6393f5b9 The big refactor — step 1: prep work (#192)
* Cleanup code, remove compiler warnings

* Add API validation to check task

1. Running binary-compatibility-validator on code
2. Flagging public data classes and failing build
3. Running Poko to autogen equals/hashcode/toString

* Remove all public data classes, add API dumps
GitOrigin-RevId: f90d8a9a992737b176f1c7d83409798628a629c1
2023-10-20 17:47:16 +08:00