Skip to content

Commit

Permalink
Revert "Use Gtk::ColorChooserDialog instead of Gtk::ColorSelectionDia…
Browse files Browse the repository at this point in the history
…log (#476)"

This reverts commit ee26d55.
  • Loading branch information
ma8ma committed Dec 12, 2020
1 parent addad5b commit 0900c94
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
3 changes: 0 additions & 3 deletions README.md
Expand Up @@ -276,13 +276,10 @@ WaylandやXWaylandではX11限定の機能を使うことができないため
* 32bit OSの古いMATE環境(バージョン[1.10][mate-1-10]から[1.16][mate-1-16]?)でJDim GTK3版を実行したとき
スレビューの上に別のウインドウを重ねて移動させると残像でスレビュー内のみ描画が乱れる。
スレビューをスクロール等させて再描画すると直る。([背景事情][mate-background])
* KDE plasma(X11?)環境では色選択ダイアログのカラーピッカーで色を抜き出すことができない。
([関連の問題?][kwin-colorpicker] - KDEのieeue)

[mate-1-10]: https://mate-desktop.org/blog/2015-06-11-mate-1-10-released/ "GTK3の実験的なサポート追加"
[mate-1-16]: https://mate-desktop.org/blog/2016-09-21-mate-1-16-released/ "GTK3に移行途中"
[mate-background]: https://github.com/JDimproved/JDim/commit/ffbce60ede#commitcomment-40911816 "別の不具合が再発する"
[kwin-colorpicker]: https://bugs.kde.org/show_bug.cgi?id=407226


## JDとの互換性
Expand Down
3 changes: 0 additions & 3 deletions docs/manual/start.md
Expand Up @@ -144,13 +144,10 @@ WaylandやXWaylandではX11限定の機能を使うことができないため
* 32bit OSの古いMATE環境(バージョン[1.10][mate-1-10]から[1.16][mate-1-16]?)でJDim GTK3版を実行したとき
スレビューの上に別のウインドウを重ねて移動させると残像でスレビュー内のみ描画が乱れる。
スレビューをスクロール等させて再描画すると直る。([背景事情][mate-background])
* KDE plasma(X11?)環境では色選択ダイアログのカラーピッカーで色を抜き出すことができない。
([関連の問題?][kwin-colorpicker] - KDEのieeue)

[mate-1-10]: https://mate-desktop.org/blog/2015-06-11-mate-1-10-released/ "GTK3の実験的なサポート追加"
[mate-1-16]: https://mate-desktop.org/blog/2016-09-21-mate-1-16-released/ "GTK3に移行途中"
[mate-background]: https://github.com/JDimproved/JDim/commit/ffbce60ede#commitcomment-40911816 "別の不具合が再発する"
[kwin-colorpicker]: https://bugs.kde.org/show_bug.cgi?id=407226


<a name="compatibility"></a>
Expand Down
8 changes: 4 additions & 4 deletions src/core.cpp
Expand Up @@ -1687,12 +1687,12 @@ bool Core::open_color_diag( std::string title, int id )
{
Gdk::RGBA color( CONFIG::get_color( id ) );

Gtk::ColorChooserDialog diag( title );
diag.set_use_alpha( false );
diag.set_rgba( color );
Gtk::ColorSelectionDialog diag( title );
diag.get_color_selection()->set_current_rgba( color );
diag.set_transient_for( *CORE::get_mainwindow() );
if( diag.run() == Gtk::RESPONSE_OK ){
CONFIG::set_color( id, MISC::color_to_str( diag.get_rgba() ) );
Gtk::ColorSelection* sel = diag.get_color_selection();
CONFIG::set_color( id, MISC::color_to_str( sel->get_current_rgba() ) );
return true;
}

Expand Down
9 changes: 5 additions & 4 deletions src/fontcolorpref.cpp
Expand Up @@ -451,11 +451,11 @@ void FontColorPref::slot_change_color()
if( colorid == COLOR_NONE ) return;
}

Gtk::ColorChooserDialog colordiag;
Gtk::ColorSelectionDialog colordiag;
if( colorid != COLOR_NONE ) {
colordiag.set_rgba( Gdk::RGBA( CONFIG::get_color( colorid ) ) );
Gtk::ColorSelection* sel = colordiag.get_color_selection();
sel->set_current_rgba( Gdk::RGBA( CONFIG::get_color( colorid ) ) );
}
colordiag.set_use_alpha( false );
colordiag.set_transient_for( *CORE::get_mainwindow() );
const int ret = colordiag.run();

Expand All @@ -468,7 +468,8 @@ void FontColorPref::slot_change_color()

colorid = row[ m_columns_color.m_col_colorid ];
if( colorid != COLOR_NONE ) {
CONFIG::set_color( colorid, MISC::color_to_str( colordiag.get_rgba() ) );
Gtk::ColorSelection* sel = colordiag.get_color_selection();
CONFIG::set_color( colorid, MISC::color_to_str( sel->get_current_rgba() ) );
}
}
}
Expand Down

0 comments on commit 0900c94

Please sign in to comment.