void LLPanelSnapshot::onCustomResolutionCommit()
{
    LLSD info;
    info["w"] = getChild<LLUICtrl>(getWidthSpinnerName())->getValue().asInteger();
    info["h"] = getChild<LLUICtrl>(getHeightSpinnerName())->getValue().asInteger();
    LLFloaterSnapshot::getInstance()->notify(LLSD().with("custom-res-change", info));
}
// virtual
BOOL LLPanelSnapshot::postBuild()
{
    getChild<LLUICtrl>(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onResolutionComboCommit, this, _1));
    getChild<LLUICtrl>(getWidthSpinnerName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onCustomResolutionCommit, this));
    getChild<LLUICtrl>(getHeightSpinnerName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onCustomResolutionCommit, this));
    getChild<LLUICtrl>(getAspectRatioCBName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onKeepAspectRatioCommit, this, _1));

    updateControls(LLSD());
    return TRUE;
}
예제 #3
0
// virtual
BOOL LLPanelSnapshot::postBuild()
{
	getChild<LLUICtrl>(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onResolutionComboCommit, this, _1));
	getChild<LLUICtrl>(getWidthSpinnerName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onCustomResolutionCommit, this));
	getChild<LLUICtrl>(getHeightSpinnerName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onCustomResolutionCommit, this));
	getChild<LLUICtrl>(getAspectRatioCBName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onKeepAspectRatioCommit, this, _1));
	getChild<LLUICtrl>(getTempUploadCBName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onTempUploadCommit, this, _1)); //FS:LO Fire-6268 [Regression] Temp upload for snapshots missing after FUI merge.

	updateControls(LLSD());
	return TRUE;
}
예제 #4
0
// virtual
void LLPanelSnapshot::updateCustomResControls()
{
	// Only show width/height spinners and the aspect ratio checkbox
	// when a custom resolution is chosen.
	LLComboBox* combo = getChild<LLComboBox>(getImageSizeComboName());
	const bool show = combo->getFirstSelectedIndex() == (combo->getItemCount() - 1);
	// <FS:Zi> Save all settings
	// getChild<LLUICtrl>(getImageSizePanelName())->setVisible(show);
	getChild<LLUICtrl>(getImageSizePanelName())->setEnabled(show);
	getChild<LLUICtrl>(getWidthSpinnerName())->setEnabled(show);
	getChild<LLUICtrl>(getHeightSpinnerName())->setEnabled(show);
	getChild<LLUICtrl>(getAspectRatioCBName())->setEnabled(show);
	// </FS:Zi>
}
S32 LLPanelSnapshot::getTypedPreviewWidth() const
{
    return getChild<LLUICtrl>(getWidthSpinnerName())->getValue().asInteger();
}
LLSpinCtrl* LLPanelSnapshot::getWidthSpinner()
{
    return getChild<LLSpinCtrl>(getWidthSpinnerName());
}