Anders Søe
05/30/2021, 6:29 PMArdian
05/30/2021, 6:36 PMSwingPanel
rendered behind another composable? I've tried using the Box
layout to wrap SwingPanel
with the other composable but it seems like it always displays SwingPanel
on top of the other.
Box {
SwingPanel { //logic here }
Image { //logic here }
}
Mitchell Syer
05/30/2021, 11:36 PM/usr/bin/codesign --force -s <identity-id> ./path/to/you/app -v
- name: Build MacOS Package
if: ${{ matrix.runtime == 'osx-x64' }}
run: |
echo ${{ secrets.APPLE_CERT }} | base64 --decode > certificate.p12
security create-keychain -p ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} build.keychain
security import certificate.p12 -k build.keychain -P ${{ secrets.APPLE_CERT_PASSWORD }} -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} build.keychain
./gradlew packagePkg notarizePkg \
-Pcompose.desktop.mac.sign=true \
-Pcompose.desktop.mac.signing.identity=${{ secrets.APPLE_IDENTITY }} \
-Pcompose.desktop.mac.notarization.appleID=${{ secrets.APPLE_ID }} \
-Pcompose.desktop.mac.notarization.password=${{ secrets.APPLE_PASSWORD }}
smallshen
05/31/2021, 5:44 AMJavier
05/31/2021, 3:41 PMgbaldeck
05/31/2021, 9:30 PMitems
function in LazyListScope. The item content is not re-rendering despite state change. Or perhaps I'm doing something wrong? here is the code
https://github.com/recursivelftr/Grim-Locations/blob/master/src/main/kotlin/io/grimlocations/ui/view/component/LocationListComponent.kt#L52Tristan B.
06/01/2021, 8:00 AMolonho
06/01/2021, 9:55 AMtheapache64
06/01/2021, 9:56 AMVadim Kapustin
06/01/2021, 12:22 PMColton Idle
06/01/2021, 1:00 PMgbaldeck
06/01/2021, 1:19 PMitems
function is not re-rendering during state changes. This seems to be an issue introduced in a recent build as everything worked fine until recently and I have not changed my code in about a month. Should bugs currently be filed on github or youtrack?Kirill Grouchnikov
06/01/2021, 1:42 PMKirill Grouchnikov
06/01/2021, 1:55 PMColumn
of items that keeps track of its selection (with global Up / Down handlers). The parts that come from Aurora - selected and rollover row highlights, as well as animated transitions on rollover and selections, including animating the foreground of the texts and the icons.Kirill Grouchnikov
06/01/2021, 1:56 PMColton Idle
06/01/2021, 4:12 PMColton Idle
06/01/2021, 4:39 PMColton Idle
06/01/2021, 4:42 PMimport androidx.compose.ui.util.lerp
in my android only compose module. But converting it to JB compose doesn't work because it can't find it. Am I missing some util dependency that's available or is lerp not available in JB compose?Yan Pujante
06/01/2021, 4:57 PMUnresolved reference: hasFocus
for FocusState
. Both in the IDE and on the command line. Am I doing something wrong?Yan Pujante
06/01/2021, 5:15 PMval userPreference = UserPreference()
Window(
size = userPreference.windowSize,
resizable = true,
title = "Test",
events = WindowEvents(onResize = userPreference::onWindowResize)
) {
App(userPreference)
}
to the new Window api. It looks like I can use val state = rememberWindowState(size = userPreference.windowSize)
, but I am not sure how to call onWindowResize
when state.size
changes...Dirk Hoffmann
06/01/2021, 7:26 PMfun defaultScrollbarStyle() = ScrollbarStyle(
minimalHeight = 16.dp,
thickness = 8.dp,
shape = RectangleShape,
hoverDurationMillis = 0,
unhoverColor = Color.Black.copy(alpha = 0.12f),
hoverColor = Color.Black.copy(alpha = 0.12f)
)
that it passes down via a
val LocalScrollbarStyle = staticCompositionLocalOf { defaultScrollbarStyle() }
now on dynamically changing dark/light themes whilst Runtime,
what is "the" supposed way that hover related Colors are dependant on MaterialTheme.colors
and the recomposition honours them even when changing the theme whilst runtime ?Felipe Gaiad
06/02/2021, 1:05 AMxxfast
06/02/2021, 4:29 AMcommonMain
source set gets excluded from the build. I’m using AS Arctic fox 2020.3.1 with jetbrains compose 0.4.0-build179
Dirk Hoffmann
06/02/2021, 10:33 AMLazyColumn
with Scrollbar for compose-desktop?Yan Pujante
06/02/2021, 3:29 PMColton Idle
06/02/2021, 4:37 PMimplementation("androidx.compose.runtime:runtime-livedata:1.0.0-beta07")
implementation("androidx.compose.ui:ui-viewbinding:1.0.0-beta07")
in my android app module but a few threads above it was recommended to not mix and match JB compose and Google compose. What dep should I use instead of the above? I will say that I'm using those above and everything seems to compile and run just fine.SrSouza
06/02/2021, 5:28 PMDavid Dupraz
06/02/2021, 8:25 PMColton Idle
06/02/2021, 11:44 PMbuildFeatures {
buildConfig = true
compose = true
viewBinding = true
}
Jacob Bosco
06/03/2021, 5:21 AMAppState
object and it has some values in nested properties that I want to access. If I use mutableStateOf()
, the state only updates when the entire AppState
object is changed not when its properties change.
I have also tried kotllin Flow for the first time but the only solution I could get was to make each of the properties a flow and then individually watch them in the main compose function.
Is there any other way to manage state where I need to watch nested properties?Jacob Bosco
06/03/2021, 5:21 AMAppState
object and it has some values in nested properties that I want to access. If I use mutableStateOf()
, the state only updates when the entire AppState
object is changed not when its properties change.
I have also tried kotllin Flow for the first time but the only solution I could get was to make each of the properties a flow and then individually watch them in the main compose function.
Is there any other way to manage state where I need to watch nested properties?Albert Chang
06/03/2021, 5:32 AMmutableStateOf()
at property level. Something similar to this.Jacob Bosco
06/03/2021, 5:37 AMstructuralEqualityPolicy()
the thing that helps deal with the nested properties?Albert Chang
06/03/2021, 5:44 AMJacob Bosco
06/03/2021, 6:06 AMclass AppState {
var fileState = mutableStateOf(File(""))
var coreState = mutableStateOf(emptyCore())
private fun createCore() {
val (instructions: List<Instruction>, parsedVariableData: List<ParsedData>) = Parser.parseDataFromFile(fileState.value)
val program = Program(
instructions = instructions,
parsedData = parsedVariableData
)
coreState.value = Core(program = program)
}
val loadFile: (File) -> Unit = {
fileState.value = it
createCore()
}
val executeProgram: () -> Unit = coreState.value::runProgram
}
Albert Chang
06/03/2021, 6:14 AMclass AppState {
var file by mutableStateOf(File(""))
val core by derivedStateOf {
val (instructions: List<Instruction>, parsedVariableData: List<ParsedData>) = Parser.parseDataFromFile(file)
val program = Program(
instructions = instructions,
parsedData = parsedVariableData
)
Core(program = program)
}
}
executeProgram
is not updating, it's expected because you are not updating it.Jacob Bosco
06/03/2021, 6:24 AMrunProgram
updates it's internal state. If I use derivedStateOf
then it won't be able to reflect that change.derivedStateOf
will evaluate the block that I pass to it when I call core.value
so it'll create a new core every-time something changes.Albert Chang
06/03/2021, 6:30 AMrunProgram
? And you don't want core
to be updated every time file
changes? Can you describe what you want more specifically?Jacob Bosco
06/03/2021, 6:35 AMmemoryArray
and registerArray
will get updated ( will have new values after running instructions like ADD, SUB etc.).
The instructions come from the file, so when I load a new file I have to parse it and for now it creates a new core.
So when file
changes I need a new core, but after runProgram
I need the same core but its property values will be different.Albert Chang
06/03/2021, 6:41 AMSo whenThe code I posted above does exactly this. If you want the properties ofchanges I need a new corefile
Core
to be observable, just define them as states (e.g. var memoryArray by mutableStateOf(emptyArray())
).Jacob Bosco
06/03/2021, 6:49 AMregisterArray
has some values that I need to observe that are nested in some more objects. I already thought of doing this but doing it individually for all of them is repetitive and fragile so I was trying to find a better approach.Albert Chang
06/03/2021, 6:53 AMvar memoryArray by mutableStateOf(emptyArray())
and var memoryArray = emptyArray()
differ much in terms of verbosity. You can't expect properties to automatically become observable.Jacob Bosco
06/03/2021, 6:55 AMmemoryArray by mutableStateOf
where Core
or MemoryArray
is defined I can't do thatAlbert Chang
06/03/2021, 6:56 AMmutableStateOf()
is UI logic?Jacob Bosco
06/03/2021, 6:57 AMAlbert Chang
06/03/2021, 7:02 AMStateFlow
. Anyway you need an observable mechanism as
You can't expect properties to automatically become observable.
Jacob Bosco
06/03/2021, 7:03 AMmutableStateOf
but I'll try to make them properties in AppState
by individually referencing them from the core
variable.Colton Idle
06/03/2021, 12:57 PMMichael Paus
06/04/2021, 8:11 AMmutableStateOf
always changes when any of the nested properties is changed.