Skip to content

Commit

Permalink
Merge pull request #1601 from xiaoyifang/opt/remove-webkit
Browse files Browse the repository at this point in the history
opt: remove webkit specific code
  • Loading branch information
xiaoyifang authored Jun 21, 2024
2 parents f1742ad + a33dbc4 commit c8e10b6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 19 deletions.
1 change: 0 additions & 1 deletion src/common/filetype.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ bool isNameOfVideo( string const & );
bool isNameOfPicture( string const & );
/// Returns true if the name resembles the one of a .tiff file (i.e. ends
/// with .tif or tiff). We have this one separately since we need to reconvert
/// TIFF files as WebKit doesn't seem to support them.
bool isNameOfTiff( string const & );
/// Returns true if the name resembles the one of a .css file
bool isNameOfCSS( string const & );
Expand Down
2 changes: 1 addition & 1 deletion src/config.hh
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ struct Class
QByteArray popupWindowState; // Binary state saved by QMainWindow
QByteArray popupWindowGeometry; // Geometry saved by QMainWindow
QByteArray dictInfoGeometry; // Geometry of "Dictionary info" window
QByteArray inspectorGeometry; // Geometry of WebKit inspector window
QByteArray inspectorGeometry; // Geometry of Web Engine inspector window
QByteArray dictionariesDialogGeometry; // Geometry of Dictionaries dialog

QString historyExportPath; // Path for export/import history
Expand Down
12 changes: 4 additions & 8 deletions src/stylesheets/article-style-st-classic.css
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ div.sdct_h {
}

.sdict_h_wav img {
/* Ugly hack since "vertical-align: middle;" looks _terrible_ in Qt4's webkit: */
vertical-align: -30%;
vertical-align: middle;
}

/* StarDict type 'm' -- Pure meaning. Presented as <pre> */
Expand Down Expand Up @@ -444,16 +443,14 @@ div.xdxf {
}

.dsl_s_wav img {
/* Ugly hack since "vertical-align: middle;" looks _terrible_ in Qt4's webkit: */
vertical-align: -30%;
vertical-align: middle;
}

.dsl_video .img {
display: inline-block;
background: url("qrc:///icons/video.png");
background-repeat: no-repeat;
/* Ugly hack since "vertical-align: middle;" looks _terrible_ in Qt4's webkit: */
vertical-align: -30%;
vertical-align: middle;
width: 22px;
height: 22px;
margin: 0;
Expand Down Expand Up @@ -2978,6 +2975,5 @@ table#sv-hooks,
}

.gls_wav img {
/* Ugly hack since "vertical-align: middle;" looks _terrible_ in Qt4's webkit: */
vertical-align: -30%;
vertical-align: middle;
}
12 changes: 4 additions & 8 deletions src/stylesheets/article-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ div.sdct_h {
}

.sdict_h_wav img {
/* Ugly hack since "vertical-align: middle;" looks _terrible_ in Qt4's webkit: */
vertical-align: -30%;
vertical-align: middle;
}

/* StarDict type 'm' -- Pure meaning. Presented as <pre> */
Expand Down Expand Up @@ -492,16 +491,14 @@ div.xdxf {
}

.dsl_s_wav img {
/* Ugly hack since "vertical-align: middle;" looks _terrible_ in Qt4's webkit: */
vertical-align: -30%;
vertical-align: middle;
}

.dsl_video .img {
display: inline-block;
background: url("qrc:///icons/video.png");
background-repeat: no-repeat;
/* Ugly hack since "vertical-align: middle;" looks _terrible_ in Qt4's webkit: */
vertical-align: -30%;
vertical-align: middle;
width: 22px;
height: 22px;
margin: 0;
Expand Down Expand Up @@ -3047,6 +3044,5 @@ table#sv-hooks,
}

.gls_wav img {
/* Ugly hack since "vertical-align: middle;" looks _terrible_ in Qt4's webkit: */
vertical-align: -30%;
vertical-align: middle;
}
2 changes: 1 addition & 1 deletion src/ui/articleview.cc
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ void ArticleView::loadFinished( bool result )

void ArticleView::handleTitleChanged( QString const & title )
{
if ( !title.isEmpty() ) // Qt 5.x WebKit raise signal titleChanges(QString()) while navigation within page
if ( !title.isEmpty() )
emit titleChanged( this, title );
}

Expand Down

0 comments on commit c8e10b6

Please sign in to comment.