コード例 #1
0
ファイル: generic_window_skin.cpp プロジェクト: EQ4/Squeezer
/// Draws a row of the list.
///
/// @param rowNumber index of row to draw
///
/// @param g graphics context
///
/// @param width row width
///
/// @param height row height
///
/// @param isRowSelected indicates whether row is currently selected
///
void GenericSkinListBoxModel::paintListBoxItem(int rowNumber, Graphics &g, int width, int height, bool isRowSelected)
{
    // draw selected rows in light blue
    if (isRowSelected)
    {
        g.fillAll(Colours::lightblue);
    }

    // get skin name for current row
    String skinName = getSkinName(rowNumber);

    // draw default skin name in bold font
    if (skinName == defaultSkinName)
    {
        g.setFont(Font(14.0f, Font::bold));
    }
    // draw all other skin names in plain font
    else
    {
        g.setFont(Font(14.0f, Font::plain));
    }

    // render row text in black
    g.setColour(Colours::black);
    g.drawText(skinName, 2, 0, width - 4, height, Justification::centredLeft, true);
}
コード例 #2
0
void MirandaSkinnedDialog::getSettingName(char *setting, const char * name, bool global)
{
	if (global)
		mir_snprintf(setting, SETTING_NAME_SIZE, "%s%s", getName(), name);
	else
		mir_snprintf(setting, SETTING_NAME_SIZE, "%s%s%s", TcharToChar(getSkinName()), getName(), name);
}
コード例 #3
0
void MirandaSkinnedDialog::updateFilename()
{
	std::tstring filename;
	getSkinnedDialogFilename(filename, getSkinName(), getName());
	setFilename(filename.c_str());
}