@@ -131,7 +131,7 @@ defmodule Scenic.Component.Button do
131
131
132
132
alias Scenic.Graph
133
133
alias Scenic.Scene
134
- alias Scenic.Primitive.Style.Theme
134
+ alias Scenic.Themes
135
135
alias Scenic.Assets.Static
136
136
137
137
import Scenic.Primitives , only: [ { :rrect , 3 } , { :text , 3 } , { :update_opts , 2 } ]
@@ -164,12 +164,12 @@ defmodule Scenic.Component.Button do
164
164
# theme is passed in as an inherited style
165
165
theme =
166
166
case opts [ :theme ] do
167
- nil -> Theme . preset ( : primary)
168
- : dark -> Theme . preset ( : primary)
169
- : light -> Theme . preset ( : primary)
167
+ nil -> Themes . preset ( { :scenic , : primary} )
168
+ { :scenic , : dark} -> Themes . preset ( { :scenic , : primary} )
169
+ { :scenic , : light} -> Themes . preset ( { :scenic , : primary} )
170
170
theme -> theme
171
171
end
172
- |> Theme . normalize ( )
172
+ |> Themes . normalize ( )
173
173
174
174
# font related info
175
175
font = Keyword . get ( styles , :font , @ default_font )
@@ -278,11 +278,11 @@ defmodule Scenic.Component.Button do
278
278
)
279
279
end
280
280
281
- defp do_special_theme_outline ( graph , : dark, border ) do
281
+ defp do_special_theme_outline ( graph , { :scenic , : dark} , border ) do
282
282
Graph . modify ( graph , :btn , & update_opts ( & 1 , stroke: { 1 , border } ) )
283
283
end
284
284
285
- defp do_special_theme_outline ( graph , : light, border ) do
285
+ defp do_special_theme_outline ( graph , { :scenic , : light} , border ) do
286
286
Graph . modify ( graph , :btn , & update_opts ( & 1 , stroke: { 1 , border } ) )
287
287
end
288
288
0 commit comments