lets-plot-compose/src/androidMain/kotlin/org/jetbrains/letsPlot/compose/PlotPanelComposeCanvas.kt [104:136]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ) } // Background val finalModifier = if (errorMessage != null) { modifier.background(Color.LightGray) } else { if (containsBackground(modifier)) { // Do not change the user-defined background modifier } else { // Use background color from the plot theme val lpColor = PlotThemeHelper.plotBackground(processedPlotSpec) val lpBackground = Color(lpColor.red, lpColor.green, lpColor.blue, lpColor.alpha) modifier.background(lpBackground) } } DisposableEffect(reg) { onDispose { // Try/catch to ensure that any exception in dispose() does not break the Composable lifecycle // Otherwise, the app window gets unclosable. try { reg.dispose() //plotCanvasFigure2.dispose() } catch (e: Exception) { LOG.error(e) { "reg.dispose() failed" } } } } Column(modifier = finalModifier) { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lets-plot-compose/src/desktopMain/kotlin/org/jetbrains/letsPlot/compose/PlotPanelComposeCanvas.kt [107:139]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ) } // Background val finalModifier = if (errorMessage != null) { modifier.background(Color.LightGray) } else { if (containsBackground(modifier)) { // Do not change the user-defined background modifier } else { // Use background color from the plot theme val lpColor = PlotThemeHelper.plotBackground(processedPlotSpec) val lpBackground = Color(lpColor.red, lpColor.green, lpColor.blue, lpColor.alpha) modifier.background(lpBackground) } } DisposableEffect(reg) { onDispose { // Try/catch to ensure that any exception in dispose() does not break the Composable lifecycle // Otherwise, the app window gets unclosable. try { reg.dispose() //plotCanvasFigure2.dispose() } catch (e: Exception) { LOG.error(e) { "reg.dispose() failed" } } } } Column(modifier = finalModifier) { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -