fixed Import LineEdit to label + label stylebox

- added a normal stylebox to label. default is StyleBoxEmpty
 - changed drawing so that it draws correct with styleboxes with margins
 - changed the LineEdit in the import to use a label with the lineEdit
   stylebox
This commit is contained in:
toger5
2017-08-04 20:16:04 +02:00
parent 19aff15a1a
commit 9fdc4874b2
4 changed files with 19 additions and 13 deletions

View File

@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "import_dock.h"
#include "editor_node.h"
class ImportDockParameters : public Object {
GDCLASS(ImportDockParameters, Object)
@ -365,8 +366,8 @@ void ImportDock::initialize_import_options() const {
ImportDock::ImportDock() {
imported = memnew(LineEdit);
imported->set_editable(false);
imported = memnew(Label);
imported->add_style_override("normal", EditorNode::get_singleton()->get_gui_base()->get_stylebox("normal", "LineEdit"));
add_child(imported);
HBoxContainer *hb = memnew(HBoxContainer);
add_margin_child(TTR("Import As:"), hb);