"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Plugins/Qt/qt_chooser_widget.cpp" between
TeXmacs-1.99.8-src.tar.gz and TeXmacs-1.99.9-src.tar.gz

About: GNU TeXmacs is a what-you-see-is-what-you-get scientific text editor, which was both inspired by TeX and GNU Emacs.

qt_chooser_widget.cpp  (TeXmacs-1.99.8-src):qt_chooser_widget.cpp  (TeXmacs-1.99.9-src)
skipping to change at line 281 skipping to change at line 281
#if !defined(Q_WS_MAC) // && !defined(Q_WS_WIN) //at least windows Xp and 7 la ck image preview, switch to custom dialog #if !defined(Q_WS_MAC) // && !defined(Q_WS_WIN) //at least windows Xp and 7 la ck image preview, switch to custom dialog
file = "(list " * file * imgdialog->getParamsAsString () * ")"; //set im age size from preview file = "(list " * file * imgdialog->getParamsAsString () * ")"; //set im age size from preview
#else //MacOs only now #else //MacOs only now
QPixmap pic (fileNames.first()); // Qt can't eps & pdf in windows. QPixmap pic (fileNames.first()); // Qt can't eps & pdf in windows.
string params; string params;
// HACK: which value should we choose here? // HACK: which value should we choose here?
//On other platforms we call image_size (u, w, h) which returns size i n pt units. //On other platforms we call image_size (u, w, h) which returns size i n pt units.
int ww = get_current_editor()->get_page_width (false) / PIXEL; int ww = get_current_editor()->get_page_width (false) / PIXEL;
int w = pic.width (); int w = pic.width ();
int h = pic.height (); int h = pic.height ();
string unit= "px"; string unit= "pt";
if (w == 0) { if (w == 0)
image_size (url_system (imname), w, h); image_size (url_system (imname), w, h);
unit= "pt";
}
if (w >= ww) { if (w >= ww) {
h= (int) ((((double) h) / ((double) w)) * ((double) ww)); h= (int) ((((double) h) / ((double) w)) * ((double) ww));
w= ww; w= ww;
} }
if (w > 0) { if (w > 0) {
params << "\"" << as_string (w) << unit << "\" " params << "\"" << as_string (w) << unit << "\" "
<< "\"" << as_string (h) << unit << "\" " << "\"" << as_string (h) << unit << "\" "
<< "\"" << "" << "\" " // xps ?? << "\"" << "" << "\" " // xps ??
<< "\"" << "" << "\""; // yps ?? << "\"" << "" << "\""; // yps ??
} }
 End of changes. 2 change blocks. 
4 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)