Whitespace cleanup

Cleans up whitespace (tab -> space), alignment and DOS line endings.
This commit is contained in:
Morgan Hardwood
2019-10-03 11:43:12 +02:00
parent 0b2b3dc974
commit 8f0de49d41
18 changed files with 2085 additions and 2097 deletions

View File

@@ -142,7 +142,7 @@ void ColoredBar::updateBackBuffer(Gtk::DrawingArea &drawingArea)
case (RTO_Left2Right):
for (int py = 0; py < h; ++py) {
for (int px = 0; px < w; ++px) {
unsigned char *pixel = surfaceData + (py * w + px) * 4;
unsigned char *pixel = surfaceData + (py * w + px) * 4;
double x_ = double( px);
//double y_ = double((h-1)-py); unused
double x01 = x_ / double(w - 1);
@@ -158,7 +158,7 @@ void ColoredBar::updateBackBuffer(Gtk::DrawingArea &drawingArea)
case (RTO_Right2Left):
for (int py = 0; py < h; ++py) {
for (int px = 0; px < w; ++px) {
unsigned char *pixel = surfaceData + (py * w + px) * 4;
unsigned char *pixel = surfaceData + (py * w + px) * 4;
//double x_ = double((w-1)-px); unused
//double y_ = double((h-1)-py); unused
double x01 = double(px) / double(w - 1);
@@ -174,7 +174,7 @@ void ColoredBar::updateBackBuffer(Gtk::DrawingArea &drawingArea)
case (RTO_Bottom2Top):
for (int py = 0; py < h; ++py) {
for (int px = 0; px < w; ++px) {
unsigned char *pixel = surfaceData + (py * w + px) * 4;
unsigned char *pixel = surfaceData + (py * w + px) * 4;
//double x_ = double((w-1)-px); unused
//double y_ = double((h-1)-py); unused
double x01 = double(px) / double(w - 1);
@@ -191,7 +191,7 @@ void ColoredBar::updateBackBuffer(Gtk::DrawingArea &drawingArea)
default:
for (int py = 0; py < h; ++py) {
for (int px = 0; px < w; ++px) {
unsigned char *pixel = surfaceData + (py * w + px) * 4;
unsigned char *pixel = surfaceData + (py * w + px) * 4;
double x_ = double( px);
double y_ = double( py);
double x01 = x_ / double(w - 1);

View File

@@ -529,13 +529,13 @@ int main (int argc, char **argv)
int ret = 0;
if (options.pseudoHiDPISupport) {
// Reading/updating GDK_SCALE early if it exists
const gchar *gscale = g_getenv("GDK_SCALE");
if (gscale && gscale[0] == '2') {
initialGdkScale = 2;
}
// HOMBRE: On Windows, if resolution is set to 200%, Gtk internal variables are SCALE=2 and DPI=96
g_setenv("GDK_SCALE", "1", true);
// Reading/updating GDK_SCALE early if it exists
const gchar *gscale = g_getenv("GDK_SCALE");
if (gscale && gscale[0] == '2') {
initialGdkScale = 2;
}
// HOMBRE: On Windows, if resolution is set to 200%, Gtk internal variables are SCALE=2 and DPI=96
g_setenv("GDK_SCALE", "1", true);
}
gdk_threads_set_lock_functions (G_CALLBACK (myGdkLockEnter), (G_CALLBACK (myGdkLockLeave)));

View File

@@ -1258,7 +1258,7 @@ void Options::readFromFile(Glib::ustring fname)
}
if (keyFile.has_key("GUI", "PseudoHiDPISupport")) {
pseudoHiDPISupport = keyFile.get_boolean("GUI", "PseudoHiDPISupport");
pseudoHiDPISupport = keyFile.get_boolean("GUI", "PseudoHiDPISupport");
}
if (keyFile.has_key("GUI", "LastPreviewScale")) {

View File

@@ -37,9 +37,9 @@ Gtk::TextDirection RTScalable::direction = Gtk::TextDirection::TEXT_DIR_NONE;
void RTScalable::setDPInScale (const double newDPI, const int newScale)
{
if (!options.pseudoHiDPISupport) {
scale = 1;
dpi = baseDPI;
return;
scale = 1;
dpi = baseDPI;
return;
}
if (scale != newScale || (scale == 1 && dpi != newDPI)) {

View File

@@ -168,7 +168,7 @@ RTWindow::RTWindow ()
#endif
//GTK318
if (options.pseudoHiDPISupport) {
fontScale = options.fontSize / (float)RTScalable::baseFontSize;
fontScale = options.fontSize / (float)RTScalable::baseFontSize;
}
if (options.rtSettings.verbose) {
printf("\"Non-Default\" font size(%d) * scale(%d) / fontScale(%.3f)\n", options.fontSize, (int)initialGdkScale, fontScale);
@@ -196,7 +196,7 @@ RTWindow::RTWindow ()
pt = fontSize / Pango::SCALE;
}
if (options.pseudoHiDPISupport) {
fontScale = (float)pt / (float)RTScalable::baseFontSize;
fontScale = (float)pt / (float)RTScalable::baseFontSize;
}
if ((int)initialGdkScale > 1 || pt != RTScalable::baseFontSize) {
css = Glib::ustring::compose ("* { font-size: %1pt}", pt * (int)initialGdkScale);