No more gross grey bars on the sides of snapshot thumbnails!!

Also random snapshot floater code sync with upstream in small places because it'll need doing at some point..
This commit is contained in:
Inusaito Sayori
2014-06-07 11:50:31 -04:00
parent 68684855c6
commit 166c4df0b3

View File

@@ -2692,7 +2692,6 @@ void LLFloaterSnapshot::Impl::onCommitSnapshotType(LLUICtrl* ctrl, void* data)
}
}
//static
void LLFloaterSnapshot::Impl::onCommitSnapshotFormat(LLUICtrl* ctrl, void* data)
{
@@ -2704,14 +2703,11 @@ void LLFloaterSnapshot::Impl::onCommitSnapshotFormat(LLUICtrl* ctrl, void* data)
}
}
// Sets the named size combo to "custom" mode.
// static
void LLFloaterSnapshot::Impl::comboSetCustom(LLFloaterSnapshot* floater, const std::string& comboname)
{
LLComboBox* combo = floater->getChild<LLComboBox>(comboname);
combo->setCurrentByIndex(combo->getItemCount() - 1); // "custom" is always the last index
storeAspectSetting(combo, comboname);
}
@@ -2954,25 +2950,25 @@ BOOL LLFloaterSnapshot::postBuild()
childSetCommitCallback("keep_aspect", Impl::onClickKeepAspect, this);
childSetCommitCallback("ui_check", Impl::onClickUICheck, this);
childSetValue("ui_check", gSavedSettings.getBOOL("RenderUIInSnapshot"));
getChild<LLUICtrl>("ui_check")->setValue(gSavedSettings.getBOOL("RenderUIInSnapshot"));
childSetCommitCallback("hud_check", Impl::onClickHUDCheck, this);
childSetValue("hud_check", gSavedSettings.getBOOL("RenderHUDInSnapshot"));
getChild<LLUICtrl>("hud_check")->setValue(gSavedSettings.getBOOL("RenderHUDInSnapshot"));
childSetCommitCallback("keep_open_check", Impl::onClickKeepOpenCheck, this);
childSetValue("keep_open_check", !gSavedSettings.getBOOL("CloseSnapshotOnKeep"));
childSetCommitCallback("layer_types", Impl::onCommitLayerTypes, this);
childSetValue("layer_types", "colors");
childSetEnabled("layer_types", FALSE);
getChild<LLUICtrl>("layer_types")->setValue("colors");
getChildView("layer_types")->setEnabled(FALSE);
childSetValue("snapshot_width", gSavedSettings.getS32(lastSnapshotWidthName()));
childSetValue("snapshot_height", gSavedSettings.getS32(lastSnapshotHeightName()));
childSetValue("freeze_time_check", gSavedSettings.getBOOL("SnapshotOpenFreezeTime"));
getChild<LLUICtrl>("freeze_time_check")->setValue(gSavedSettings.getBOOL("SnapshotOpenFreezeTime"));
childSetCommitCallback("freeze_time_check", Impl::onCommitFreezeTime, this);
childSetValue("auto_snapshot_check", gSavedSettings.getBOOL("AutoSnapshot"));
getChild<LLUICtrl>("auto_snapshot_check")->setValue(gSavedSettings.getBOOL("AutoSnapshot"));
childSetCommitCallback("auto_snapshot_check", Impl::onClickAutoSnap, this);
childSetCommitCallback("temp_check", Impl::onClickTemporaryImage, this);
@@ -3037,7 +3033,7 @@ void LLFloaterSnapshot::draw()
S32 offset_y = (thumb_area.mBottom + thumb_area.mTop - previewp->getThumbnailHeight()) / 2;
gGL.matrixMode(LLRender::MM_MODELVIEW);
gl_rect_2d(thumb_area, LLColor4::grey4, true);
gl_rect_2d(thumb_area, LLColor4::transparent, true);
gl_draw_scaled_image(offset_x, offset_y,
previewp->getThumbnailWidth(), previewp->getThumbnailHeight(),
previewp->getThumbnailImage(), LLColor4::white);