Commit 4e49ee51 authored by Martin Flöser's avatar Martin Flöser

Removing the Sharpen Effect.

The effect has been known to cause some problems for quite some time
and is not really useful. Therfore dropping the effect.
See discussion on kwin mailinglist:
http://lists.kde.org/?l=kwin&m=129597766829618&w=2
parent 58b6721a
......@@ -107,7 +107,6 @@ if( KWIN_HAVE_OPENGL_COMPOSITING )
include( wobblywindows/CMakeLists.txt )
endif( KWIN_HAVE_OPENGL_COMPOSITING )
if( KWIN_HAVE_OPENGL_COMPOSITING AND NOT KWIN_HAVE_OPENGLES_COMPOSITING )
include( sharpen/CMakeLists.txt )
include( snow/CMakeLists.txt )
endif( KWIN_HAVE_OPENGL_COMPOSITING AND NOT KWIN_HAVE_OPENGLES_COMPOSITING )
......
......@@ -52,7 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "trackmouse/trackmouse_config.h"
#include "wobblywindows/wobblywindows_config.h"
#ifndef KWIN_HAVE_OPENGLES
#include "sharpen/sharpen_config.h"
#include "snow/snow_config.h"
#endif
#endif
......@@ -94,7 +93,6 @@ KWIN_EFFECT_CONFIG_MULTIPLE( builtins,
KWIN_EFFECT_CONFIG_SINGLE( trackmouse, TrackMouseEffectConfig )
KWIN_EFFECT_CONFIG_SINGLE( wobblywindows, WobblyWindowsEffectConfig )
#ifndef KWIN_HAVE_OPENGLES
KWIN_EFFECT_CONFIG_SINGLE( sharpen, SharpenEffectConfig )
KWIN_EFFECT_CONFIG_SINGLE( snow, SnowEffectConfig )
#endif
#endif
......
#######################################
# Effect
# Source files
set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
sharpen/sharpen.cpp
)
# .desktop files
install( FILES
sharpen/sharpen.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
# Data files
install( FILES
sharpen/data/sharpen.frag
sharpen/data/sharpen.vert
DESTINATION ${DATA_INSTALL_DIR}/kwin )
#######################################
# Config
# Source files
set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
sharpen/sharpen_config.cpp
)
# .desktop files
install( FILES
sharpen/sharpen_config.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
uniform sampler2D sceneTex;
uniform float textureWidth;
uniform float textureHeight;
// Converts pixel coordinates to texture coordinates
vec2 pix2tex(vec2 pix)
{
return vec2(pix.x / textureWidth, 1.0 - pix.y / textureHeight);
}
void main()
{
float amount = 0.4;
vec3 tex = texture2D(sceneTex, pix2tex(gl_TexCoord[0].xy)).rgb * (1.0 + 4.0 * amount);
tex -= texture2D(sceneTex, pix2tex(gl_TexCoord[0].xy + vec2(0.0, 1.0))).rgb * amount;
tex -= texture2D(sceneTex, pix2tex(gl_TexCoord[0].xy + vec2(0.0, -1.0))).rgb * amount;
tex -= texture2D(sceneTex, pix2tex(gl_TexCoord[0].xy + vec2(1.0, 0.0))).rgb * amount;
tex -= texture2D(sceneTex, pix2tex(gl_TexCoord[0].xy + vec2(-1.0, 0.0))).rgb * amount;
gl_FragColor = vec4(tex, 1.0);
}
void main()
{
gl_TexCoord[0].xy = gl_Vertex.xy;
gl_Position = ftransform();
}
/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2007 Rivo Laks <rivolaks@hot.ee>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include "sharpen.h"
#include <kactioncollection.h>
#include <kaction.h>
#include <klocale.h>
namespace KWin
{
KWIN_EFFECT( sharpen, SharpenEffect )
KWIN_EFFECT_SUPPORTED( sharpen, ShaderEffect::supported() )
SharpenEffect::SharpenEffect() : QObject(), ShaderEffect("sharpen")
{
KActionCollection* actionCollection = new KActionCollection( this );
KAction* a = (KAction*)actionCollection->addAction( "Sharpen" );
a->setText( i18nc("@action Enables/Disables an effect that makes windows more sharp", "Toggle Sharpen Effect" ));
a->setGlobalShortcut(KShortcut(Qt::CTRL + Qt::META + Qt::Key_S));
connect(a, SIGNAL(triggered(bool)), this, SLOT(toggle()));
}
void SharpenEffect::toggle()
{
setEnabled( !isEnabled());
}
} // namespace
#include "sharpen.moc"
[Desktop Entry]
Name=Sharpen
Name[af]=Verskerp
Name[ar]=اشحذ
Name[ast]=Agudizáu
Name[bg]=Отчетливост
Name[ca]=Aguditza
Name[ca@valencia]=Aguditza
Name[cs]=Zaostření
Name[csb]=Wëòstrzëc
Name[da]=Gør skarpere
Name[de]=Schärfen
Name[el]=Όξυνση
Name[en_GB]=Sharpen
Name[eo]=Akrigi
Name[es]=Agudizado
Name[et]=Teravdus
Name[eu]=Enfokatu
Name[fa]=تیز کردن
Name[fi]=Terävöitä
Name[fr]=Accentuation de la netteté
Name[fy]=Skerpje
Name[ga]=Géaraigh
Name[gl]=Focalización
Name[gu]=તીક્ષ્ણ
Name[he]=חידוד
Name[hi]=सुस्पष्ट
Name[hne]=बढ़िया साफ
Name[hr]=Izoštrivanje
Name[hu]=Élesítés
Name[ia]=Face plus acute
Name[id]=Pertajam
Name[is]=Skerpa
Name[it]=Nitidezza
Name[ja]=シャープ化
Name[kk]=Айықындату
Name[km]=ធ្វើ​ឲ្យ​ច្បាស់
Name[kn]=ಸ್ಫುಟಗೊಳಿಸು (ಶಾರ್ಪನ್)
Name[ko]=선명하게
Name[lt]=Paaštrinimas
Name[lv]=Asināt
Name[mai]=तीक्ष्ण
Name[mk]=Изострување
Name[ml]=സൂക്ഷ്മമാക്കുക
Name[mr]=सुस्पष्ट
Name[nb]=Skjerpe
Name[nds]=Scharp maken
Name[ne]=चहकिलो
Name[nl]=Verscherpen
Name[nn]=Oppskarping
Name[pa]=ਉਘੜਵਾਂ
Name[pl]=Wyostrzenie
Name[pt]=Afiamento
Name[pt_BR]=Nitidez
Name[ro]=Ascute
Name[ru]=Увеличение чёткости
Name[se]=Basttálmuhte
Name[si]=තියුණු
Name[sk]=Zaostriť
Name[sl]=Izostritev
Name[sr]=Изоштравање
Name[sr@ijekavian]=Изоштравање
Name[sr@ijekavianlatin]=Izoštravanje
Name[sr@latin]=Izoštravanje
Name[sv]=Skärpa
Name[ta]=கூர்மையாக்கு
Name[te]=పదునుగా
Name[tg]=Четкость
Name[th]=ปรับความคมชัด
Name[tr]=Keskinleştir
Name[uk]=Збільшити різкість
Name[uz]=Oʻtkirlash
Name[uz@cyrillic]=Ўткирлаш
Name[wa]=Rawijhî
Name[x-test]=xxSharpenxx
Name[zh_CN]=锐化
Name[zh_TW]=讓輪廓更分明
Comment=Make the entire desktop look sharper
Comment[ar]=يعطي كامل سطح المكتب شكلا حادا
Comment[ast]=Agudizal 'escritoriu
Comment[bg]=Прави работния плот по-отчетлив
Comment[ca]=Fa que tot l'escriptori sembli més definit
Comment[ca@valencia]=Fa que tot l'escriptori parega més definit
Comment[cs]=Zaostří celou vaši plochu
Comment[csb]=Sprôwiô to, że pùlt wëzdrzi barżi òstro
Comment[da]=Får hele skrivebordet til at se skarpere ud
Comment[de]=Lässt Ihre Arbeitsfläche schärfer erscheinen.
Comment[el]=Κάνει την επιφάνεια εργασίας σας να δείχνει πιο οξεία
Comment[en_GB]=Make the entire desktop look sharper
Comment[eo]=Akrigas la tutan labortablon
Comment[es]=Agudiza su escritorio
Comment[et]=Muudab töölaua välimuse teravamaks
Comment[eu]=Zure mahaiagain osoa enfokatzen du
Comment[fi]=Tee koko työpöydästä terävämmän näköinen
Comment[fr]=Fait apparaître l'ensemble du bureau plus nettement
Comment[fy]=Makket jo buroblêd ekstra dúdlik
Comment[ga]=Géaraigh dealramh na deisce
Comment[gl]=Fai que o escritorio aparente estar máis focalizado
Comment[gu]=સમગ્ર ડેસ્કટોપને ચોખ્ખું દેખાતું બનાવો
Comment[he]=חידוד מראה שולחן העבודה
Comment[hi]=आपके डेस्कटॉप को सुस्पष्ट करता है
Comment[hne]=पूरा डेस्कटाप ल बढ़िया साफ देखाथे
Comment[hr]=Izoštrivanje izgleda cijele radne površine
Comment[hu]=Élesebbé teszi a kontúrokat az asztalon
Comment[ia]=Face le integre scriptorio semblante plus acute
Comment[id]=BUat seluruh desktop tampak lebih tajam
Comment[is]=Lætur skjáborðið sýnast skarpara
Comment[it]=Rende tutto il desktop più nitido
Comment[ja]=デスクトップ全体をシャープに見せます
Comment[kk]=Үстеліңіздің көрінісін айқындатады
Comment[km]=ធ្វើ​ឲ្យ​ផ្ទៃតុ​របស់ទាំង​មូល​​ច្បាស់​ជាង​មុន​​
Comment[kn]=ಪೂರ್ಣ ಗಣಕತೆರೆ ಸ್ಫುಟವಾಗಿ ಕಾಣುವಂತೆ ಮಾಡು
Comment[ko]=데스크톱을 선명하게 표시합니다
Comment[lt]=Paaštrina darbastalį
Comment[lv]=Liek jūsu darbvirsmai izskatīties asākai
Comment[mk]=Ја прави целата работна површина да изгледа поизострено
Comment[ml]=നിങ്ങളുടെ പണിയിടം സൂക്ഷ്മമാക്കുന്നു
Comment[mr]=संपूर्ण डेस्कटॉपचे प्रदर्शन तेज करा
Comment[nb]=Får hele skrivebordet til å se skarpere ut
Comment[nds]=Dien Schriefdisch wat scharper utsehn laten
Comment[nl]=Maakt het uiterlijk van de hele desktop scherper
Comment[nn]=Få skrivebordet til å sjå skarpare ut
Comment[pa]=ਆਪਣੇ ਡੈਸਕਟਾਪ ਦਿੱਖ ਸੁਧਾਰੋ
Comment[pl]=Sprawia, że pulpit wygląda bardziej ostro
Comment[pt]=Tornar o seu ecrã mais definido
Comment[pt_BR]=Deixa sua área de trabalho mais nítida
Comment[ro]=Face întregul birou să arate mai ascuțit
Comment[ru]=Увеличение чёткости рабочего стола
Comment[si]=මුළු වැඩතලයම තියුණු ලෙස පෙන්වන්න
Comment[sk]=Zaostrí celú plochu
Comment[sl]=Celotno namizje izgleda bolj ostro
Comment[sr]=Да цела површ изгледа изоштреније
Comment[sr@ijekavian]=Да цијела површ изгледа изоштреније
Comment[sr@ijekavianlatin]=Da cijela površ izgleda izoštrenije
Comment[sr@latin]=Da cela površ izgleda izoštrenije
Comment[sv]=Gör att hela skrivbordet ser skarpare ut
Comment[ta]=Make the entire desktop look sharper
Comment[tg]=Муҳити мизи кории GNOME
Comment[th]=ทำให้พื้นที่ทำงานของคุณดูคมชัดมากขึ้น
Comment[tr]=Masaüstünüzü keskinleştirir
Comment[uk]=Надання кольорам вашої стільниці більшої різкості
Comment[x-test]=xxMake the entire desktop look sharperxx
Comment[zh_CN]=使整个桌面看起来更锐利
Comment[zh_TW]=讓您的桌面看起來更輪廓分明
Icon=preferences-system-windows-effect-sharpen
Type=Service
X-KDE-ServiceTypes=KWin/Effect
X-KDE-PluginInfo-Author=Rivo Laks
X-KDE-PluginInfo-Email=rivolaks@hot.ee
X-KDE-PluginInfo-Name=kwin4_effect_sharpen
X-KDE-PluginInfo-Version=0.1.0
X-KDE-PluginInfo-Category=Accessibility
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=false
X-KDE-Library=kwin4_effect_builtins
/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2007 Rivo Laks <rivolaks@hot.ee>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#ifndef KWIN_SHARPEN_H
#define KWIN_SHARPEN_H
#include <kwinshadereffect.h>
namespace KWin
{
/**
* Sharpens the whole desktop
**/
class SharpenEffect : public QObject, public ShaderEffect
{
Q_OBJECT
public:
SharpenEffect();
public slots:
void toggle();
};
} // namespace
#endif
/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2007 Rivo Laks <rivolaks@hot.ee>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include "sharpen_config.h"
#include <kwineffects.h>
#include <klocale.h>
#include <kdebug.h>
#include <KActionCollection>
#include <kaction.h>
#include <KShortcutsEditor>
#include <QVBoxLayout>
namespace KWin
{
KWIN_EFFECT_CONFIG_FACTORY
SharpenEffectConfig::SharpenEffectConfig(QWidget* parent, const QVariantList& args) :
KCModule(EffectFactory::componentData(), parent, args)
{
QVBoxLayout* layout = new QVBoxLayout(this);
// Shortcut config. The shortcut belongs to the component "kwin"!
KActionCollection *actionCollection = new KActionCollection( this, KComponentData("kwin") );
KAction* a = static_cast<KAction*>(actionCollection->addAction( "Sharpen" ));
a->setText( i18nc("@action Enables/Disables an effect that makes windows more sharp", "Toggle Sharpen Effect" ));
a->setProperty("isConfigurationAction", true);
a->setGlobalShortcut(KShortcut(Qt::CTRL + Qt::META + Qt::Key_S));
mShortcutEditor = new KShortcutsEditor(actionCollection, this,
KShortcutsEditor::GlobalAction, KShortcutsEditor::LetterShortcutsDisallowed);
connect(mShortcutEditor, SIGNAL(keyChange()), this, SLOT(changed()));
layout->addWidget(mShortcutEditor);
layout->addStretch();
load();
}
SharpenEffectConfig::~SharpenEffectConfig()
{
// Undo (only) unsaved changes to global key shortcuts
mShortcutEditor->undoChanges();
}
void SharpenEffectConfig::load()
{
KCModule::load();
emit changed(false);
}
void SharpenEffectConfig::save()
{
KCModule::save();
mShortcutEditor->save(); // undo() will restore to this state from now on
emit changed(false);
EffectsHandler::sendReloadMessage( "sharpen" );
}
void SharpenEffectConfig::defaults()
{
mShortcutEditor->allDefault();
emit changed(true);
}
} // namespace
#include "sharpen_config.moc"
[Desktop Entry]
Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-Library=kcm_kwin4_effect_builtins
X-KDE-ParentComponents=kwin4_effect_sharpen
X-KDE-PluginKeyword=sharpen
Name=Sharpen
Name[af]=Verskerp
Name[ar]=اشحذ
Name[ast]=Agudizáu
Name[bg]=Отчетливост
Name[ca]=Aguditza
Name[ca@valencia]=Aguditza
Name[cs]=Zaostření
Name[csb]=Wëòstrzëc
Name[da]=Gør skarpere
Name[de]=Schärfen
Name[el]=Όξυνση
Name[en_GB]=Sharpen
Name[eo]=Akrigi
Name[es]=Agudizado
Name[et]=Teravdus
Name[eu]=Enfokatu
Name[fa]=تیز کردن
Name[fi]=Terävöitä
Name[fr]=Accentuation de la netteté
Name[fy]=Skerpje
Name[ga]=Géaraigh
Name[gl]=Focalización
Name[gu]=તીક્ષ્ણ
Name[he]=חידוד
Name[hi]=सुस्पष्ट
Name[hne]=बढ़िया साफ
Name[hr]=Izoštrivanje
Name[hu]=Élesítés
Name[ia]=Face plus acute
Name[id]=Pertajam
Name[is]=Skerpa
Name[it]=Nitidezza
Name[ja]=シャープ化
Name[kk]=Айықындату
Name[km]=ធ្វើ​ឲ្យ​ច្បាស់
Name[kn]=ಸ್ಫುಟಗೊಳಿಸು (ಶಾರ್ಪನ್)
Name[ko]=선명하게
Name[lt]=Paaštrinimas
Name[lv]=Asināt
Name[mai]=तीक्ष्ण
Name[mk]=Изострување
Name[ml]=സൂക്ഷ്മമാക്കുക
Name[mr]=सुस्पष्ट
Name[nb]=Skjerpe
Name[nds]=Scharp maken
Name[ne]=चहकिलो
Name[nl]=Verscherpen
Name[nn]=Oppskarping
Name[pa]=ਉਘੜਵਾਂ
Name[pl]=Wyostrzenie
Name[pt]=Afiamento
Name[pt_BR]=Nitidez
Name[ro]=Ascute
Name[ru]=Увеличение чёткости
Name[se]=Basttálmuhte
Name[si]=තියුණු
Name[sk]=Zaostriť
Name[sl]=Izostritev
Name[sr]=Изоштравање
Name[sr@ijekavian]=Изоштравање
Name[sr@ijekavianlatin]=Izoštravanje
Name[sr@latin]=Izoštravanje
Name[sv]=Skärpa
Name[ta]=கூர்மையாக்கு
Name[te]=పదునుగా
Name[tg]=Четкость
Name[th]=ปรับความคมชัด
Name[tr]=Keskinleştir
Name[uk]=Збільшити різкість
Name[uz]=Oʻtkirlash
Name[uz@cyrillic]=Ўткирлаш
Name[wa]=Rawijhî
Name[x-test]=xxSharpenxx
Name[zh_CN]=锐化
Name[zh_TW]=讓輪廓更分明
/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2007 Rivo Laks <rivolaks@hot.ee>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#ifndef KWIN_SHARPEN_CONFIG_H
#define KWIN_SHARPEN_CONFIG_H
#include <kcmodule.h>
class KShortcutsEditor;
namespace KWin
{
class SharpenEffectConfig : public KCModule
{
Q_OBJECT
public:
explicit SharpenEffectConfig(QWidget* parent = 0, const QVariantList& args = QVariantList());
~SharpenEffectConfig();
public slots:
virtual void save();
virtual void load();
virtual void defaults();
private:
KShortcutsEditor* mShortcutEditor;
};
} // namespace
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment