I have tried to build my own Template App (Canvas) where I have my own custom Spinner, Header Component and a footer component. The 3 mentioned things work fine. I can put them on new screens and everything works as it should.
I have now tried to apply a Custom Theme in the App onStart property.
Here is the code:
// My Theme
// COLOR PALETTE
Set(
gblAppColors,
{
// Primary Colors
Primary1: ColorValue("#30475E"), // Navy Blue
Primary2: ColorValue("#F05454"), // Light Red
Primary3: ColorValue("#222831"), // Dark Blue
Primary4: ColorValue("#DDDDDD"), // Light Gray
// Accent Colors
Black: ColorValue("#000000"),
Cyan: ColorValue("#17A2B8"),
Green: ColorValue("#28A745"),
Orange: ColorValue("#FD7E14"),
Red: ColorValue("#DC3545"),
Teal: ColorValue("#20C997"),
White: ColorValue("#FFFFFF"),
Yellow: ColorValue("#FFC107"),
// Neutral Colors
GrayDark: ColorValue("#484644"),
GrayMediumDark: ColorValue("#8A8886"),
GrayMedium: ColorValue("#B3b0AD"),
GrayMediumLight: ColorValue("#D2D0CE"),
GrayLight: ColorValue("#F3F2F1")
}
);
// FONTS & SIZES
Set(
gblAppFonts,
{
Heading: "Roboto, Open Sans",
Body: "Lato",
Size: {
Tiny: 10,
Regular: 12,
Subtitle: 14,
Title: 20,
Huge: 28
}
}
);
// ICONS
Set(
gblAppIcons,
{
Checklist: "data:image/svg+xml;utf8, %3Csvg%20%20viewBox%3D%270%200%202048%202048%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%3Cpath%20d%3D%27M256%200h1536v2048H256V0zm1408%201920V128H384v1792h1280zM1536%20512v128h-512V512h512zm0%20512v128h-512v-128h512zm0%20512v128h-512v-128h512zM941%20429L704%20666%20531%20493l90-90%2083%2083%20147-147%2090%2090zm0%20512l-237%20237-173-173%2090-90%2083%2083%20147-147%2090%2090zm0%20512l-237%20237-173-173%2090-90%2083%2083%20147-147%2090%2090z%27%20fill%3D%27%230078d4%27%3E%3C%2Fpath%3E%3C%2Fsvg%3E",
Checkmark: "data:image/svg+xml;utf8, %3Csvg%20%20viewBox%3D%270%200%202048%202048%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%3Cpath%20d%3D%27M1024%200q141%200%20272%2036t244%20104%20207%20160%20161%20207%20103%20245%2037%20272q0%20141-36%20272t-104%20244-160%20207-207%20161-245%20103-272%2037q-141%200-272-36t-244-104-207-160-161-207-103-245-37-272q0-141%2036-272t104-244%20160-207%20207-161T752%2037t272-37zm603%20685l-136-136-659%20659-275-275-136%20136%20411%20411%20795-795z%27%20fill%3D%27%2300ad56%27%3E%3C%2Fpath%3E%3C%2Fsvg%3E",
Pylon: "data:image/svg+xml;utf8, %3Csvg%20%20viewBox%3D%270%200%202048%202048%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%3Cpath%20d%3D%27M1920%201920v128H128v-128h270l96-384h802l-32-128H526l64-256h610l-32-128H622l224-896h356l448%201792h270z%27%20fill%3D%27%23ca5010%27%3E%3C%2Fpath%3E%3C%2Fsvg%3E",
Flashlight: "data:image/svg+xml;utf8, %3Csvg%20%20viewBox%3D%270%200%202048%202048%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%3Cpath%20d%3D%27M2048%20384v1152h-475l-256-256H0V640h1317l256-256h475zM128%201152h1152V768H128v384zm1499%20256h37V512h-37l-219%20219v458l219%20219zm293-896h-128v896h128V512zm-832%20384q26%200%2045%2019t19%2045q0%2026-19%2045t-45%2019q-26%200-45-19t-19-45q0-26%2019-45t45-19z%27%20fill%3D%27%2369797e%27%3E%3C%2Fpath%3E%3C%2Fsvg%3E"
}
);
// DEFAULT STYLES
Set(
gblAppDefaults,
{
BorderColor: gblAppColors.GrayMedium,
BorderStyle: BorderStyle.None,
BorderThickness: 2,
CalendarHeaderFill: ColorFade(gblAppColors.Primary1, -30%),
CheckboxBorderColor: gblAppColors.GrayMediumDark,
CheckmarkFill: gblAppColors.Primary2,
ChevronBackground: gblAppColors.White,
ChevronDisabledBackground: gblAppColors.GrayLight,
ChevronDisabledFill: gblAppColors.GrayMedium,
ChevronFill: gblAppColors.GrayDark,
ChevronHoverBackground: gblAppColors.GrayMediumLight,
ChevronHoverFill: gblAppColors.GrayDark,
Color: gblAppColors.Black,
DisabledBorderColor: gblAppColors.White,
DisabledColor: gblAppColors.GrayMedium,
DisabledFill: gblAppColors.GrayLight,
DisabledSelectionColor: gblAppColors.GrayMedium,
DisabledSelectionFill: gblAppColors.GrayMedium,
FalseFill: gblAppColors.GrayMediumDark,
FalseHoverFill: gblAppColors.GrayDark,
Fill: gblAppColors.Green,
FocusedBorderColor: gblAppColors.White,
FocusedBorderThickness: 4,
Font: Font.'Segoe UI',
FontWeight: FontWeight.Semibold,
HandleActiveFill: gblAppColors.White,
HandleFill: gblAppColors.White,
HandleHoverFill: gblAppColors.White,
Height: 40,
HoverBorderColor: ColorFade(gblAppColors.Primary1, -30%),
HoverColor: gblAppColors.White,
HoverDateFill: gblAppColors.GrayMedium,
HoverFill: ColorFade(gblAppColors.Primary1, -10%),
IconBackground: gblAppColors.Primary1,
PaddingBottom: 5,
PaddingLeft: 12,
PaddingRight: 5,
PaddingTop: 5,
PressedBorderColor: gblAppColors.Primary1,
PressedColor: gblAppColors.White,
PressedFill: ColorFade(gblAppColors.Primary1, -30%),
RadioBorderColor: gblAppColors.Primary1,
RadioSelectionFill: gblAppColors.Primary1,
RadiusBottomLeft: 0,
RadiusBottomRight: 0,
RadiusTopLeft: 0,
RadiusTopRight: 0,
RailFill: gblAppColors.GrayMedium,
RailHoverFill: ColorFade(gblAppColors.Primary1, 80%),
RatingFill: gblAppColors.Primary2,
SelectedDateFill: gblAppColors.Primary1,
SelectionFill: gblAppColors.Primary1,
Size: gblAppFonts.Size.Regular,
TrueFill: gblAppColors.Primary1,
TrueHoverFill: ColorFade(gblAppColors.Primary1, -30%),
ValueFill: gblAppColors.GrayMediumDark,
ValueHoverFill: gblAppColors.Primary1
}
);
//CONTROL STYLES
Set(
varAppStyles,
{
// COMBO BOX (all default styles)
ComboBox: {
BorderColor: gblAppDefaults.BorderColor,
ChevronBackground: gblAppDefaults.ChevronBackground,
ChevronDisabledBackground: gblAppDefaults.ChevronDisabledBackground,
ChevronDisabledFill: gblAppDefaults.ChevronDisabledFill,
ChevronFill: gblAppDefaults.ChevronFill,
ChevronHoverBackground: gblAppDefaults.ChevronHoverBackground,
ChevronHoverFill: gblAppDefaults.ChevronHoverFill,
Color: gblAppDefaults.Color,
DisabledBorderColor: gblAppDefaults.DisabledBorderColor,
DisabledColor: gblAppDefaults.DisabledColor,
DisabledFill: gblAppDefaults.DisabledFill,
Fill: gblAppDefaults.Fill,
Font: gblAppDefaults.Font,
HoverBorderColor: gblAppDefaults.HoverBorderColor,
HoverColor: gblAppDefaults.HoverColor,
HoverFill: gblAppDefaults.HoverFill,
PressedBorderColor: gblAppDefaults.PressedBorderColor,
PressedColor: gblAppDefaults.PressedColor,
PressedFill: gblAppDefaults.PressedFill,
SelectionFill: gblAppDefaults.SelectionFill,
Size: gblAppDefaults.Size
},
// BUTTON (default styles + overrides)
Button: {
BorderColor: gblAppColors.Primary2,
DisabledBorderColor: gblAppDefaults.DisabledBorderColor,
DisabledColor: gblAppDefaults.DisabledColor,
DisabledFill: gblAppDefaults.DisabledFill,
Fill: gblAppColors.Primary2,
FocusedBorderColor: gblAppDefaults.FocusedBorderColor,
Font: gblAppDefaults.Font,
FontWeight: gblAppDefaults.FontWeight,
HoverBorderColor: gblAppColors.Primary2,
HoverColor: gblAppDefaults.HoverColor,
HoverFill: ColorFade(gblAppColors.Primary2, -10%),
PressedBorderColor: gblAppColors.Primary2,
PressedColor: gblAppDefaults.PressedColor,
PressedFill: ColorFade(gblAppColors.Primary2, -30%),
RadiusBottomLeft: gblAppDefaults.RadiusBottomLeft,
RadiusBottomRight: gblAppDefaults.RadiusBottomRight,
RadiusTopLeft: gblAppDefaults.RadiusTopLeft,
RadiusTopRight: gblAppDefaults.RadiusTopRight,
Size: gblAppDefaults.Size
}
}
);
However. After i Run OnStart, save and Publish my app i cant get my new app components to take the custom feel in use.
I tried putting a button and a combobox into a new screen and they still show up with Default values. The Font and fontSize is default too.
Is there something else that i am missing?