Skip to content

Commit

Permalink
Make hints happy
Browse files Browse the repository at this point in the history
  • Loading branch information
devkanro committed Feb 17, 2024
1 parent 0e039d8 commit fef62a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import com.intellij.ui.NewUI
import org.jetbrains.jewel.bridge.theme.isNewUiTheme
import org.jetbrains.jewel.foundation.InternalJewelApi
import org.jetbrains.jewel.foundation.theme.JewelTheme
import org.jetbrains.jewel.foundation.util.inDebugMode
import org.jetbrains.jewel.ui.painter.PainterHint
import org.jetbrains.jewel.ui.painter.PalettePainterHintsProvider
import org.jetbrains.jewel.ui.painter.hints.ColorBasedPaletteReplacement
import org.jetbrains.jewel.ui.painter.hints.Dark
import org.jetbrains.jewel.ui.painter.hints.HiDpi
import org.jetbrains.jewel.ui.painter.hints.KeyBasedPaletteReplacement
import org.jetbrains.jewel.foundation.util.inDebugMode
import org.jetbrains.jewel.ui.util.toRgbaHexString

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import org.jetbrains.jewel.foundation.theme.JewelTheme
import org.jetbrains.jewel.foundation.theme.ThemeDefinition
import org.jetbrains.jewel.foundation.util.inDebugMode
import org.jetbrains.jewel.ui.painter.PainterHint
import org.jetbrains.jewel.ui.painter.PalettePainterHintsProvider
import org.jetbrains.jewel.ui.painter.hints.ColorBasedPaletteReplacement
import org.jetbrains.jewel.ui.painter.hints.Dark
import org.jetbrains.jewel.ui.painter.hints.HiDpi
import org.jetbrains.jewel.ui.painter.hints.KeyBasedPaletteReplacement
import org.jetbrains.jewel.ui.painter.hints.PathOverride
import org.jetbrains.jewel.foundation.util.inDebugMode

/** Provides the default [PainterHint]s to use to load images. */
public class StandalonePainterHintsProvider(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public class ResourcePainterProvider(
when (extension) {
"svg" -> createSvgPainter(chosenScope, url)
"xml" -> createVectorDrawablePainter(chosenScope, url)
else -> createBitmapPainter(chosenScope, url)
else -> createBitmapPainter(url)
}

for (hint in scope.acceptedHints) {
Expand Down Expand Up @@ -210,7 +210,6 @@ public class ResourcePainterProvider(

@Composable
private fun createBitmapPainter(
scope: Scope,
url: URL,
) = tryLoadingResource(
url = url,
Expand Down

0 comments on commit fef62a9

Please sign in to comment.