Rebuilds the buttons for this widget since they use specific palette
        options.
        
        :param      palette | <QPalette>
514751
def setPalette(self, palette):
        
        super(XSplitButton, self).setPalette(palette)
        self.rebuild()
111267
private void rebuild()
    {
        pollact = null;

        pollSize = pollers.size();
        if (pollset != null) {
            pollset.close();
        }
        pollset = context.poller(pollSize);
        assert (pollset != null);

        pollact = new SPoller[pollSize];

        int itemNbr = 0;
        for (SPoller poller : pollers) {
            pollset.register(poller.item);
            pollact[itemNbr] = poller;
            itemNbr++;
        }
        dirty = false;
    }
640824
def update_buttons(self):
        """"""
        current_scheme = self.current_scheme
        names = self.get_option("names")
        try:
            names.pop(names.index(u'Custom'))
        except ValueError:
            pass
        delete_enabled = current_scheme not in names
        self.delete_button.setEnabled(delete_enabled)
        self.reset_button.setEnabled(not delete_enabled)
102583
def set_widgets(self):
        """"""
        # The list is already populated in the previous step, but now we
        # need to do it again in case we're back from the Keyword Wizard.
        # First, preserve self.parent.layer before clearing the list
        last_layer = self.parent.layer and self.parent.layer.id() or None
        self.lblDescribeCanvasExpLayer.clear()
        self.list_compatible_canvas_layers()
        self.auto_select_one_item(self.lstCanvasExpLayers)
        # Try to select the last_layer, if found:
        if last_layer:
            layers = []
            for indx in range(self.lstCanvasExpLayers.count()):
                item = self.lstCanvasExpLayers.item(indx)
                layers += [item.data(Qt.UserRole)]
            if last_layer in layers:
                self.lstCanvasExpLayers.setCurrentRow(layers.index(last_layer))

        # Set icon
        exposure = self.parent.step_fc_functions1.selected_value(
            layer_purpose_exposure['key'])
        icon_path = get_image_path(exposure)
        self.lblIconIFCWExposureFromCanvas.setPixmap(QPixmap(icon_path))
450150
def on_palette_name_changed(self, combo):
        
        palette_name = combo.get_active_text()
        if palette_name not in PALETTES:
            return
        self.settings.styleFont.set_string('palette', PALETTES[palette_name])
        self.settings.styleFont.set_string('palette-name', palette_name)
        self.set_palette_colors(PALETTES[palette_name])
        self.update_demo_palette(PALETTES[palette_name])
907477
def set_palette_colors(self, palette):
        
        palette = palette.split(':')
        for i, pal in enumerate(palette):
            x, color = Gdk.Color.parse(pal)
            self.get_widget('palette_%d' % i).set_color(color)
946656
private void rebuildSimpleTab() {

        m_form.removeGroup(CmsPropertyPanel.TAB_SIMPLE);
        CmsPropertyPanel panel = ((CmsPropertyPanel)m_form.getWidget());
        panel.clearTab(CmsPropertyPanel.TAB_SIMPLE);
        if (m_handler.hasEditableName()) {
            m_form.addField(CmsPropertyPanel.TAB_SIMPLE, createUrlNameField());
        }
        internalBuildConfiguredFields();
        m_form.renderGroup(CmsPropertyPanel.TAB_SIMPLE);
    }
221809
private void updateButtonBars() {

        List<I_CmsEditableGroupRow> rows = getRows();
        int i = 0;
        for (I_CmsEditableGroupRow row : rows) {
            boolean first = i == 0;
            boolean last = i == (rows.size() - 1);
            row.getButtonBar().setFirstLast(first, last, m_hideAdd);
            i += 1;
        }
    }
299654
def remake_display(self, *args):
        
        Builder.load_string(self.kv)
        if hasattr(self, '_kv_layout'):
            self.remove_widget(self._kv_layout)
            del self._kv_layout
        self._kv_layout = KvLayout()
        self.add_widget(self._kv_layout)
358340
public void resetEditButtons() {

        removeEditButtonsPositionTimer();
        m_editButtonsPositionTimer = new Timer() {

            /** Timer run counter. */
            private int m_timerRuns;

            @Override
            public void run() {

                for (org.opencms.ade.containerpage.client.ui.CmsContainerPageContainer container : m_targetContainers.values()) {
                    container.showEditableListButtons();
                    container.updateOptionBars();
                }
                if (m_timerRuns > 3) {
                    cancel();
                }
                m_timerRuns++;
            }
        };
        m_editButtonsPositionTimer.scheduleRepeating(100);
    }
752035
def refreshUi( self ):
        
        dataSet = self.dataSet()
        if not dataSet:
            return False
            
        # lookup widgets based on the data set information
        for widget in self.findChildren(QWidget):
            prop = unwrapVariant(widget.property('dataName'))
            if prop is None:
                continue
            
            # update the data for the widget
            prop_name = nativestring(prop)
            if prop_name in dataSet:
                value = dataSet.value(prop_name)
                projexui.setWidgetValue(widget, value)
        
        return True
1042671
def set_palette(self, background, foreground):
        
        palette = QPalette()
        palette.setColor(QPalette.Base, background)
        palette.setColor(QPalette.Text, foreground)
        self.setPalette(palette)

        # Set the right background color when changing color schemes
        # or creating new Editor windows. This seems to be a Qt bug.
        # Fixes Issue 2028 and 8069
        if self.objectName():
            style = "QPlainTextEdit#%s {background: %s; color: %s;}" % \
                    (self.objectName(), background.name(), foreground.name())
            self.setStyleSheet(style)
1104884
def update_all_buttons(self, ):
        
        for widget, button in self._buttons.items():
            self.update_button(button, widget)
        self.adjustSize()
242034
public void updateButtons() {
		AbstractButton cancelButton = wizard.getCancelButton();
		if (cancelButton != null) {
			cancelButton.setEnabled(currentPage.isCancelAllowed());
		}
		AbstractButton previousButton = wizard.getPreviousButton();
		if (previousButton != null) {
			previousButton.setEnabled(currentPage.isPreviousAllowed() && !pageHistory.isEmpty());
		}
		AbstractButton nextButton = wizard.getNextButton();
		if (nextButton != null) {
			nextButton.setEnabled(currentPage.isNextAllowed() && (currentPage.getNextPage() != null));
		}
		AbstractButton finishButton = wizard.getFinishButton();
		if (finishButton != null) {
			finishButton.setEnabled(currentPage.isFinishAllowed());
		}
	}
85536
def adjustButtons( self ):
        
        tabbar = self.tabBar()
        tabbar.adjustSize()
        
        w = self.width() - self._optionsButton.width() - 2
        self._optionsButton.move(w, 0)
        
        if self.count():
            need_update = self._addButton.property('alone') != False
            if need_update:
                self._addButton.setProperty('alone', False)
                
            
            self._addButton.move(tabbar.width(), 1)
            self._addButton.setFixedHeight(tabbar.height())
        else:
            need_update = self._addButton.property('alone') != True
            if need_update:
                self._addButton.setProperty('alone', True)
            
            self._addButton.move(tabbar.width() + 2, 1)
        
        self._addButton.stackUnder(self.currentWidget())
        
        # force refresh on the stylesheet (Qt limitation for updates)
        if need_update:
            app = QApplication.instance()
            app.setStyleSheet(app.styleSheet())
34181
public function initializePalette(): void
    {
        if (Input::get('act') === 'edit') {
            $model = GridModel::findByPk(Input::get('id'));
            $sizes = array_map(
                function ($value) {
                    return $value . 'Size';
                },
                StringUtil::deserialize($model->sizes, true)
            );

            PaletteManipulator::create()
                ->addField($sizes, 'sizes')
                ->applyToPalette('default', 'tl_bs_grid');
        }
    }
148489
def _build_gui(self):
        
        # remove all widgets (should destroy all children too)
        self._central_widget.deleteLater()

        # remove all references to other controls
        self._sliders               = []
        self._buttons_top_color     = []
        self._buttons_bottom_color  = []
        self._checkboxes            = []
        self._buttons_plus          = []
        self._buttons_minus         = []
        self._color_dialogs_top     = []
        self._color_dialogs_bottom  = []

        # create the new central widget
        self._central_widget = _qtw.QWidget()
        self._window.setCentralWidget(self._central_widget)

        # layout for main widget
        self._layout = _qtw.QGridLayout(self._central_widget)
        self._central_widget.setLayout(self._layout)

        # add the list of cmaps
        self._combobox_cmaps = _qtw.QComboBox(self._central_widget)
        self._combobox_cmaps.setEditable(True)
        self._load_cmap_list()

        # add the save and delete buttons
        self._button_save   = _qtw.QPushButton("Save",   self._central_widget)
        self._button_delete = _qtw.QPushButton("Delete", self._central_widget)
        self._button_save.setFixedWidth(70)
        self._button_delete.setFixedWidth(70)

        # layouts
        self._layout.addWidget(self._combobox_cmaps, 1,1, 1,3, _qtcore.Qt.Alignment(0))
        self._layout.addWidget(self._button_save,    1,5, 1,1, _qtcore.Qt.Alignment(1))
        self._layout.addWidget(self._button_delete,  1,6, 1,2, _qtcore.Qt.Alignment(1))

        # actions
        self._combobox_cmaps.currentIndexChanged.connect(self._signal_load)
        self._button_save  .clicked.connect(self._button_save_clicked)
        self._button_delete.clicked.connect(self._button_delete_clicked)

        # ensmallen the window
        self._window.resize(10,10)

        # now create a control set for each color point
        for n in range(len(self._colorpoint_list)):

            c1 = self._colorpoint_list[n][1]
            c2 = self._colorpoint_list[n][2]

            # create a top-color button
            self._buttons_top_color.append(_qtw.QPushButton(self._central_widget))
            self._buttons_top_color[-1].setStyleSheet("background-color: rgb("+str(int(c2[0]*255))+","+str(int(c2[1]*255))+","+str(int(c2[2]*255))+"); border-radius: 3px;")

            # create a bottom-color button
            self._buttons_bottom_color.append(_qtw.QPushButton(self._central_widget))
            self._buttons_bottom_color[-1].setStyleSheet("background-color: rgb("+str(int(c1[0]*255))+","+str(int(c1[1]*255))+","+str(int(c1[2]*255))+"); border-radius: 3px;")

            # create color dialogs
            self._color_dialogs_top.append(_qtw.QColorDialog(self._central_widget))
            self._color_dialogs_top[-1].setCurrentColor(self._buttons_top_color[-1].palette().color(1))

            self._color_dialogs_bottom.append(_qtw.QColorDialog(self._central_widget))
            self._color_dialogs_bottom[-1].setCurrentColor(self._buttons_top_color[-1].palette().color(1))

            # create link checkboxes
            self._checkboxes.append(_qtw.QCheckBox(self._central_widget))
            self._checkboxes[-1].setChecked(c1==c2)

            # create a slider
            self._sliders.append(_qtw.QSlider(self._central_widget))
            self._sliders[-1].setOrientation(_qtcore.Qt.Horizontal)
            self._sliders[-1].setMaximum(1000)
            self._sliders[-1].setValue(int(self._colorpoint_list[n][0]*1000))
            self._sliders[-1].setFixedWidth(250)

            # create + and - buttons
            self._buttons_plus.append(_qtw.QPushButton(self._central_widget))
            self._buttons_plus[-1].setText("+")
            self._buttons_plus[-1].setFixedWidth(25)

            self._buttons_minus.append(_qtw.QPushButton(self._central_widget))
            self._buttons_minus[-1].setText("-")
            self._buttons_minus[-1].setFixedWidth(25)

            # layout
            self._layout.addWidget(self._buttons_bottom_color[-1], n+3,1,      _qtcore.Qt.AlignCenter)
            self._layout.addWidget(self._checkboxes[-1],           n+3,2, 1,1, _qtcore.Qt.AlignCenter)
            self._layout.addWidget(self._buttons_top_color[-1],    n+3,3,      _qtcore.Qt.AlignCenter)
            self._layout.addWidget(self._sliders[-1],              n+3,4, 1,2, _qtcore.Qt.AlignCenter)
            self._layout.setColumnStretch(5,100)
            self._layout.addWidget(self._buttons_minus[-1],        n+3,7,      _qtcore.Qt.AlignCenter)
            self._layout.addWidget(self._buttons_plus[-1],         n+3,6,      _qtcore.Qt.AlignCenter)

            # connect the buttons and slider actions to the calls
            self._buttons_bottom_color[-1]            .clicked.connect(_partial(self._color_button_clicked, n, 0))
            self._buttons_top_color[-1]               .clicked.connect(_partial(self._color_button_clicked, n, 1))
            self._color_dialogs_bottom[-1].currentColorChanged.connect(_partial(self._color_dialog_changed, n, 0))
            self._color_dialogs_top[-1]   .currentColorChanged.connect(_partial(self._color_dialog_changed, n, 1))

            self._buttons_plus[-1]        .clicked.connect(_partial(self._button_plus_clicked,  n))
            self._buttons_minus[-1]       .clicked.connect(_partial(self._button_minus_clicked, n))
            self._sliders[-1]        .valueChanged.connect(_partial(self._slider_changed,   n))



        # disable the appropriate sliders
        self._sliders[0] .setDisabled(True)
        self._sliders[-1].setDisabled(True)