UNPKG

@dark-engine/platform-desktop

Version:

Dark renderer to desktop platforms like Windows, Linux, macOS via Nodegui and Qt

23 lines (22 loc) 752 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); exports.QDarkComboBox = exports.ComboBox = void 0; const nodegui_1 = require('@nodegui/nodegui'); const core_1 = require('@dark-engine/core'); const factory_1 = require('../factory'); const ComboBox = (0, core_1.component)(props => (0, factory_1.qComboBox)(props), { displayName: 'ComboBox', }); exports.ComboBox = ComboBox; class QDarkComboBox extends nodegui_1.QComboBox { setItems(items) { this.clear(); items.forEach(x => this.addItem(x.icon, x.text, x.userData)); } async setCurrentIndex(value) { await Promise.resolve(); this.setProperty('currentIndex', value); } } exports.QDarkComboBox = QDarkComboBox; //# sourceMappingURL=combo-box.js.map