Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iconbutton impl #164

Merged

Conversation

edivad1999
Copy link
Collaborator

No description provided.

@edivad1999 edivad1999 linked an issue Oct 10, 2023 that may be closed by this pull request
@fscarponi fscarponi force-pushed the davide.magli/157-iconbutton-same-specs-as-actionbutton-in-swing branch from da55acd to 63dd6f6 Compare October 10, 2023 15:14
@fscarponi fscarponi changed the title Davide.magli/157 iconbutton same specs as actionbutton in swing iconbutton impl Oct 11, 2023
@fscarponi fscarponi marked this pull request as ready for review October 11, 2023 11:00
@fscarponi fscarponi requested a review from rock3r October 11, 2023 11:00
@fscarponi fscarponi force-pushed the davide.magli/157-iconbutton-same-specs-as-actionbutton-in-swing branch from 4f36d72 to 2779c33 Compare October 11, 2023 11:04
edivad1999 and others added 11 commits October 12, 2023 09:20
(cherry picked from commit b51807c)
(cherry picked from commit ecbaa1a)
(cherry picked from commit da55acd)
The existing metric defining approach, IconButtonMetrics, was restricting the theming of the IconButton component effectively. Thus, the 'IconButtonMetrics' was replaced by 'IconButtonStyle' and the necessary changes for the field change were implemented. This would assist in providing the same theme across different platforms. The 'IconButton' has been made theme-aware by allowing access to theme and style via properties. Changes were made in implementations concerning IntelliJTheme, BaseIntUiTheme, and ComponentShowcaseTab. File names were also appropriately renamed.
Revised the button state logic of the IconButton component in IconButtonMetrics.kt with a more intuitive 'when' statement, improving readability. Likewise, method declarations in the IntUiBridge.kt file were reformatted for brevity. This maintenance will enhance the code's readability and thus its maintainability. Changes in IconButton.kt reflect the updated logic and background colour application.

The @stable annotation was attached to the IconButtonMetrics interface to indicate thread-safe and side-effect-free operations, a useful indicator for composing efficient composable functions in Jetpack Compose.
The methodology for selecting the state of the IconButton was refactored from a 'when' statement to the 'chooseValue'
The IntUiDarkTheme now uses different colors for the "pressed" and "hovered" states of a button. Additionally, the background color selection logic has been refactored in IconButtonMetrics.kt to use a simpler and more readable 'when' construct.
This commit replaces the 'more' button icon with a 'close' button icon in ComponentShowcaseTab.kt. It also removes the 'propagateMinConstraints' property from IconButton.kt. In addition, it adjusts IconButton to not necessarily need 'Modifier.size' in Buttons.kt. These changes are made to improve the UI's look and functionality.
…ntuitive interface. Default background color for disabled buttons has been set
@fscarponi fscarponi force-pushed the davide.magli/157-iconbutton-same-specs-as-actionbutton-in-swing branch from 8683bdf to 89f2840 Compare October 12, 2023 07:28
This update adds border styling to the IconButton component. The main changes include importing 'border' from the compose foundation, defining border color for different button states, and applying the border in the IconButton component. This change was made to improve the overall visual appearance of the button, especially in different states, providing a more intuitive interface. It also helps better distinguish the buttons from the background, improving user interaction."
@fscarponi fscarponi requested a review from rock3r October 12, 2023 12:57
@rock3r rock3r merged commit aa8dc74 into main Oct 12, 2023
10 checks passed
@rock3r rock3r deleted the davide.magli/157-iconbutton-same-specs-as-actionbutton-in-swing branch October 12, 2023 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IconButton (same specs as ActionButton in Swing)
4 participants