Godot Version
v4.2.1
Question
The default theme for almost every node is StyleBoxFlat, but when I’m creating a new StyleBoxFlat in the theme editor, it’s a whole new one without border and shadow and everything, which makes it very hard to mimic the default theme especially when you only want to adjust a few properties a little bit. So is there any way to get to know these default values?
Read the source code.
I think it could be this one
/**************************************************************************/
/* default_theme.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
This file has been truncated. show original
mrcdk
April 6, 2024, 5:18pm
3
You can import the default theme’s styles in a theme using the theme editor. Use the With Data
option. It should let you edit the default styleboxes styles. More info Using the theme editor — Godot Engine (stable) documentation in English
1 Like