#19461 Rework Shout Preferences#19464
Conversation
- Reorganize the syntax highlighting settings around the predefined styles - Create two new predefined styles `Custom` and `Default` with special behaviour - Modify logic for switching the UITheme so that changing it only switches the style if the current style is `Default` - Fix emphasis `bold italic` - Make open code editors reflect changes to the `Custom` style directly - Reorganize the inner workings of `SHPreferences` - Replace `SHStyleElement` with `SHCustomStyle` and `SHCustomStyleElement`
|
@demarey and @estebanlm are currently working on the SettingBrowser. Maybe they can be interested to review this PR |
|
is this working in the context of the new settings browser ? |
| SHCustomStyle class >> color: aColor forGroup: aGroupName [ | ||
|
|
||
| (groups at: aGroupName) at: #color put: aColor. | ||
| SHPreferences cutomStyleChanged |
|
Hi belaroesener If you have some cycles for another PR after we integrate this one. Tx |
This PR addresses the Issues I had with the old settings browser. I had not followed the development of the new setting browser, but now I am realizing that it is the default Browser in Pharo14? (I always use CMD-, to open the settings browser, but this still opens the old browser). The style elements use special widgets, from my understanding the logic used by the new browser is a bit different for this. I'll look into it |
Sure, could you elaborate a bit on what symbols you mean? |
|
I think he is refering to the methods with the pragma #styleTable: For example: ^ #(
(default ('657A81' muchDarker))
...
)This will create symbols. He would like it to become ^ #(
('default' ('657A81' muchDarker))
...
)This is what I understood. Maybe Steph can confirm |
|
Yes I refered to this list of symbols. |
|
Hello did you see my comment? cutom has a typo. |
|
@Ducasse Yes, it's a typo. Thanks, I'll fix it. |
|
Thanks. Can you check the conflict? |
|
Tx I will integrate it now. |
|
I do not get why the build is not working so I trigger a rebuild and we will have look at the build. |
Rename `SHCustomStyleElement` to `SHStyleElement` (the class it replaced) to fix dependency of Pharo-NewTools.
I'm looking into it now. |
|
Excellent. Basically I was analyze the use of symbols and it seems that it does not use an identity based structure, so it means that using strings for keys is just enough. |
|
The changes are looking ok to me. Let me know when I can integrate. |
|
@belaroesener |
…onary` internally. (This will make the transition from symbols to strings easier)
@Ducasse I looked at it, but I can not reproduce it. It does not sound like it has anything to do with Shout. My code should be ready to integrate now |
|
Thanks a lot! |
|
I;m sorry that we do not integrate it before but we got many regression. |
I reorganized the Shout Preferences around the predefined styles already available, adding two special styles
CustomandDefault.Defaultrepresents the style for the currently selected UI Theme and will change if the UI Theme changes.Customrepresents the style editable via theSettingBrowserand can be initialized by copying it from any of the other styles.I fixed the problems described in #19461:
Default#themeChangedto the world whenever any of the style elements is changed in theSettingBrowser. This works but I would be happy for any suggestions to make it work better, as this solution seems somewhat inefficient.SHStyleElementwith two new classes, that manage the state in a different way, and do not exhibit the same problems.bold italicnow works